Skip to content

Commit 3710972

Browse files
committed
test: increase errors in PropertyDeclaration
Probably caused by update in slevomat or squizlabs I don't really want to dig what's new, all are legit finds: ``` vendor/bin/phpcs `find tests/input/PropertyDeclaration.php` WARNING: The PHPCS Coding Standards for doctrine/coding-standards standard uses 1 deprecated sniff ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - SlevomatCodingStandard.TypeHints.UnionTypeHintFormat This sniff has been deprecated since Slevomat Coding Standard 8.16.0 and will be removed in Slevomat Coding Standard 9.0.0. Use SlevomatCodingStandard.TypeHints.DNFTypeHintFormat instead. Deprecated sniffs are still run, but will stop working at some point in the future. E 1 / 1 (100%) FILE: tests/input/PropertyDeclaration.php -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 16 ERRORS AFFECTING 5 LINES -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 9 | ERROR | [x] Equals sign not aligned correctly; expected 1 space but found 2 spaces (Generic.Formatting.MultipleStatementAlignment.Incorrect) 10 | ERROR | [x] There must be exactly one space between type hint and property $stringProperty. (SlevomatCodingStandard.Classes.PropertyDeclaration.MultipleSpacesBetweenTypeHintAndProperty) 10 | ERROR | [x] There must be 1 space after the property type declaration; 2 found (PSR2.Classes.PropertyDeclaration.SpacingAfterType) 11 | ERROR | [x] Scope keyword "public" must be followed by a single space; found 2 (Squiz.WhiteSpace.ScopeKeywordSpacing.Incorrect) 11 | ERROR | [x] There must be exactly one space before type hint of property $intProperty. (SlevomatCodingStandard.Classes.PropertyDeclaration.MultipleSpacesBeforeTypeHint) 12 | ERROR | [x] Usage of short nullable type hint in "?string" is disallowed. (SlevomatCodingStandard.TypeHints.UnionTypeHintFormat.DisallowedShortNullable) 12 | ERROR | [x] There must be no whitespace between type hint nullability symbol and type hint of property $nullableString. (SlevomatCodingStandard.Classes.PropertyDeclaration.WhitespaceAfterNullabilitySymbol) 15 | ERROR | [x] Expected 1 space after visibility modifier "public"; 2 found (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterVisbility) 15 | ERROR | [x] Scope keyword "public" must be followed by a single space; found 2 (Squiz.WhiteSpace.ScopeKeywordSpacing.Incorrect) 15 | ERROR | [x] There must be exactly one space between modifiers of property $foo. (SlevomatCodingStandard.Classes.PropertyDeclaration.MultipleSpacesBetweenModifiers) 15 | ERROR | [x] Expected 1 space after readonly modifier; 2 found (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterReadonly) 15 | ERROR | [x] Scope keyword "readonly" must be followed by a single space; found 2 (Squiz.WhiteSpace.ScopeKeywordSpacing.Incorrect) 15 | ERROR | [x] There must be exactly one space before type hint of property $foo. (SlevomatCodingStandard.Classes.PropertyDeclaration.MultipleSpacesBeforeTypeHint) 15 | ERROR | [x] Expected 1 space between type hint and argument "$foo"; 2 found (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint) 15 | ERROR | [x] There must be exactly one space between parameter type hint and parameter $foo. (SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing.MultipleSpacesBetweenTypeHintAndParameter) 15 | ERROR | [x] There must be exactly one space between type hint and property $foo. (SlevomatCodingStandard.Classes.PropertyDeclaration.MultipleSpacesBetweenTypeHintAndProperty) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Time: 95ms; Memory: 12MB ```
1 parent 2b558dd commit 3710972

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

tests/expected_report.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tests/input/null_coalesce_equal_operator.php 5 0
3434
tests/input/null_coalesce_operator.php 3 0
3535
tests/input/null_safe_operator.php 1 0
3636
tests/input/optimized-functions.php 1 0
37-
tests/input/PropertyDeclaration.php 14 0
37+
tests/input/PropertyDeclaration.php 16 0
3838
tests/input/return_type_on_closures.php 26 0
3939
tests/input/return_type_on_methods.php 22 0
4040
tests/input/semicolon_spacing.php 3 0
@@ -54,9 +54,9 @@ tests/input/use-ordering.php 1 0
5454
tests/input/useless-semicolon.php 2 0
5555
tests/input/UselessConditions.php 21 0
5656
----------------------------------------------------------------------
57-
A TOTAL OF 464 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
57+
A TOTAL OF 466 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
5858
----------------------------------------------------------------------
59-
PHPCBF CAN FIX 380 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
59+
PHPCBF CAN FIX 382 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
6060
----------------------------------------------------------------------
6161

6262

tests/php72-compatibility.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ index a646ff6..84c9474 100644
3737
tests/input/null_coalesce_operator.php 3 0
3838
-tests/input/null_safe_operator.php 1 0
3939
tests/input/optimized-functions.php 1 0
40-
-tests/input/PropertyDeclaration.php 14 0
40+
-tests/input/PropertyDeclaration.php 16 0
4141
-tests/input/return_type_on_closures.php 26 0
4242
-tests/input/return_type_on_methods.php 22 0
4343
+tests/input/PropertyDeclaration.php 6 0
@@ -60,10 +60,10 @@ index a646ff6..84c9474 100644
6060
-tests/input/UselessConditions.php 21 0
6161
+tests/input/UselessConditions.php 20 0
6262
----------------------------------------------------------------------
63-
-A TOTAL OF 464 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
63+
-A TOTAL OF 466 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
6464
+A TOTAL OF 415 ERRORS AND 2 WARNINGS WERE FOUND IN 46 FILES
6565
----------------------------------------------------------------------
66-
-PHPCBF CAN FIX 380 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
66+
-PHPCBF CAN FIX 382 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
6767
+PHPCBF CAN FIX 331 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
6868
----------------------------------------------------------------------
6969

tests/php73-compatibility.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ index d1e1fad..9a78bc1 100644
2828
tests/input/null_coalesce_operator.php 3 0
2929
-tests/input/null_safe_operator.php 1 0
3030
tests/input/optimized-functions.php 1 0
31-
-tests/input/PropertyDeclaration.php 14 0
31+
-tests/input/PropertyDeclaration.php 16 0
3232
-tests/input/return_type_on_closures.php 26 0
3333
-tests/input/return_type_on_methods.php 22 0
3434
+tests/input/PropertyDeclaration.php 6 0
@@ -52,10 +52,10 @@ index d1e1fad..9a78bc1 100644
5252
-tests/input/UselessConditions.php 21 0
5353
+tests/input/UselessConditions.php 20 0
5454
----------------------------------------------------------------------
55-
-A TOTAL OF 464 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
55+
-A TOTAL OF 466 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
5656
+A TOTAL OF 419 ERRORS AND 2 WARNINGS WERE FOUND IN 47 FILES
5757
----------------------------------------------------------------------
58-
-PHPCBF CAN FIX 380 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
58+
-PHPCBF CAN FIX 382 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
5959
+PHPCBF CAN FIX 335 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
6060
----------------------------------------------------------------------
6161

tests/php74-compatibility.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ index d1e1fad..ed67841 100644
2626
tests/input/null_coalesce_operator.php 3 0
2727
-tests/input/null_safe_operator.php 1 0
2828
tests/input/optimized-functions.php 1 0
29-
-tests/input/PropertyDeclaration.php 14 0
29+
-tests/input/PropertyDeclaration.php 16 0
3030
-tests/input/return_type_on_closures.php 26 0
3131
-tests/input/return_type_on_methods.php 22 0
3232
+tests/input/PropertyDeclaration.php 6 0
@@ -50,10 +50,10 @@ index d1e1fad..ed67841 100644
5050
-tests/input/UselessConditions.php 21 0
5151
+tests/input/UselessConditions.php 20 0
5252
----------------------------------------------------------------------
53-
-A TOTAL OF 464 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
53+
-A TOTAL OF 466 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
5454
+A TOTAL OF 428 ERRORS AND 2 WARNINGS WERE FOUND IN 47 FILES
5555
----------------------------------------------------------------------
56-
-PHPCBF CAN FIX 380 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
56+
-PHPCBF CAN FIX 382 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
5757
+PHPCBF CAN FIX 344 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
5858
----------------------------------------------------------------------
5959

tests/php80-compatibility.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ index d1e1fad..71022c4 100644
1414
tests/input/null_coalesce_operator.php 3 0
1515
tests/input/null_safe_operator.php 1 0
1616
tests/input/optimized-functions.php 1 0
17-
-tests/input/PropertyDeclaration.php 14 0
17+
-tests/input/PropertyDeclaration.php 16 0
1818
+tests/input/PropertyDeclaration.php 11 0
1919
tests/input/return_type_on_closures.php 26 0
2020
tests/input/return_type_on_methods.php 22 0
@@ -23,10 +23,10 @@ index d1e1fad..71022c4 100644
2323
tests/input/useless-semicolon.php 2 0
2424
tests/input/UselessConditions.php 21 0
2525
----------------------------------------------------------------------
26-
-A TOTAL OF 464 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
26+
-A TOTAL OF 466 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
2727
+A TOTAL OF 458 ERRORS AND 2 WARNINGS WERE FOUND IN 49 FILES
2828
----------------------------------------------------------------------
29-
-PHPCBF CAN FIX 380 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
29+
-PHPCBF CAN FIX 382 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
3030
+PHPCBF CAN FIX 374 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
3131
----------------------------------------------------------------------
3232

0 commit comments

Comments
 (0)