-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace empty() calls in CliOptions Since `empty()` works on null undefined without a warning, it also hides bugs from static analysis (causing the bug in #99). This change should have the same effect while not ignoring warnings. * Replace `empty()` in other files with more explicit checks Again, this is because `empty()` allows undefined values and hides potential bugs from static analysis. * Replace isset with array_key_exists in Cli * Replace isset in addCacheEntry * Replace isset with array_key_exists in CliOptions->fromArray * Replace isset in CliOptions->toArray * Replace isset with array_key_exists in FullReporter * Replace isset in getPhpcsStandardOption * Use boolval to make CliOptions->toArray more explicit * Make json_encode guard more explicit in JsonReporter * Make fileName guard in LintMessages more explicit * Use more explicit guards in some UnixShell getters * Make getExecutablePath guards more explicit * Make getExecutablePath even more explicit * Add line breaks for preg_match to debug which condition is a problem psalm reports `RiskyTruthyFalsyComparison` for this line but I can't figure out why. * Replace `empty()` in UnixShell->getPhpcsVersion
- Loading branch information
1 parent
3811a96
commit 7be9f99
Showing
9 changed files
with
121 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.