Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request supersedes:
Checklist
Description
Follow-up to junaidbhura#59 and fork of junaidbhura#58.
Depends on #2 being merged first.
Added an EditorConfig ruleset to enforce tabs for PHP files and spaces for JSON, Markdown, NEON, YML, and XML files. This should help avoid accidental mixing of tabs if one's IDE supports this feature.
Added PHPStan dependency to help finds bugs and logic flaws. Given that tests are absent and not so simple to write given the proprietary and expensive nature of its target WP plugins.
PHPStan's situation is a little complicated given this plugin supports multiple versions of different packages (notably Composer and vlucas/phpdotenv). PHPStan can't tell that and reports errors for whichever version is not installed. To resolve this, I've introduced a way to conditionally include different baselines based on what is installed in order to hide "errors" from versions not installed.
This conditional functionality can be greatly reduced if we drop support for older versions of PHP, Composer, and other dependencies.
How has this been tested?
Types of changes