Closed jrfnl closed 4 years ago
I've done the prep work to implement this and am left with 9 issues for which I'd like the opinion of one of the maintainers of this package on how to solve this. /cc @schlessera
protected
, not private
) properties should be safe to rename.FILE: inc\checks\class-check.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------
14 | WARNING | Property name "$_when" should not be prefixed with an underscore to
| | indicate visibility (PSR2.Classes.PropertyDeclaration.Underscore)
23 | WARNING | Property name "$_status" should not be prefixed with an underscore to
| | indicate visibility (PSR2.Classes.PropertyDeclaration.Underscore)
30 | WARNING | Property name "$_message" should not be prefixed with an underscore to
| | indicate visibility (PSR2.Classes.PropertyDeclaration.Underscore)
------------------------------------------------------------------------------------------
FILE: inc\checks\class-file-contents.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
34 | WARNING | Found: ==. Use strict comparisons (=== or !==).
| | (WordPress.PHP.StrictComparisons.LooseComparison)
49 | WARNING | Found: ==. Use strict comparisons (=== or !==).
| | (WordPress.PHP.StrictComparisons.LooseComparison)
------------------------------------------------------------------------------------------
FILE: inc\checks\class-file.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
15 | WARNING | Property name "$_when" should not be prefixed with an underscore to
| | indicate visibility (PSR2.Classes.PropertyDeclaration.Underscore)
47 | WARNING | Property name "$_matches" should not be prefixed with an underscore to
| | indicate visibility (PSR2.Classes.PropertyDeclaration.Underscore)
------------------------------------------------------------------------------------------
FILE: inc\checks\class-option-value.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
44 | WARNING | Found: ==. Use strict comparisons (=== or !==).
| | (WordPress.PHP.StrictComparisons.LooseComparison)
52 | WARNING | Found: ==. Use strict comparisons (=== or !==).
| | (WordPress.PHP.StrictComparisons.LooseComparison)
------------------------------------------------------------------------------------------
We have a new PHPCS standard for WP-CLI called WPCliCS. It is part of the wp-cli/wp-cli-tests package starting with version v2.1.0.
To adopt & enforce this new standard, the following actions need to be taken for this repository:
A sample PR for a simple repository can be seen here: https://github.com/wp-cli/maintenance-mode-command/pull/3/files
Related wp-cli/wp-cli#5179