diff --git a/lib/Doctrine/ruleset.xml b/lib/Doctrine/ruleset.xml index 5a2a8e7f..7c3a608a 100644 --- a/lib/Doctrine/ruleset.xml +++ b/lib/Doctrine/ruleset.xml @@ -460,6 +460,12 @@ + + + + + + diff --git a/tests/expected_report.txt b/tests/expected_report.txt index 6cf1696e..3d5b3f1c 100644 --- a/tests/expected_report.txt +++ b/tests/expected_report.txt @@ -5,8 +5,9 @@ FILE ERRORS WARNINGS ---------------------------------------------------------------------- tests/input/array_indentation.php 10 0 tests/input/assignment-operators.php 4 0 +tests/input/binary_operators.php 9 0 tests/input/class-references.php 10 0 -tests/input/concatenation_spacing.php 24 0 +tests/input/concatenation_spacing.php 27 0 tests/input/constants-no-lsb.php 2 0 tests/input/constants-var.php 3 0 tests/input/doc-comment-spacing.php 10 0 @@ -19,25 +20,25 @@ tests/input/inline_type_hint_assertions.php 6 0 tests/input/LowCaseTypes.php 2 0 tests/input/namespaces-spacing.php 7 0 tests/input/new_with_parentheses.php 18 0 -tests/input/not_spacing.php 8 0 +tests/input/not_spacing.php 9 0 tests/input/null_coalesce_operator.php 3 0 tests/input/optimized-functions.php 1 0 tests/input/return_type_on_closures.php 21 0 tests/input/return_type_on_methods.php 17 0 -tests/input/semicolon_spacing.php 3 0 +tests/input/semicolon_spacing.php 4 0 tests/input/spread-operator.php 6 0 tests/input/static-closures.php 1 0 tests/input/superfluous-naming.php 11 0 tests/input/test-case.php 8 0 -tests/input/trailing_comma_on_array.php 1 0 +tests/input/trailing_comma_on_array.php 2 0 tests/input/traits-uses.php 11 0 tests/input/UnusedVariables.php 1 0 tests/input/useless-semicolon.php 2 0 tests/input/UselessConditions.php 20 0 ---------------------------------------------------------------------- -A TOTAL OF 264 ERRORS AND 0 WARNINGS WERE FOUND IN 31 FILES +A TOTAL OF 279 ERRORS AND 0 WARNINGS WERE FOUND IN 32 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 216 OF THESE SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX 231 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- diff --git a/tests/fixed/binary_operators.php b/tests/fixed/binary_operators.php new file mode 100644 index 00000000..cab93cbe --- /dev/null +++ b/tests/fixed/binary_operators.php @@ -0,0 +1,11 @@ += 10; +} diff --git a/tests/fixed/concatenation_spacing.php b/tests/fixed/concatenation_spacing.php index 3c71f119..6021acf9 100644 --- a/tests/fixed/concatenation_spacing.php +++ b/tests/fixed/concatenation_spacing.php @@ -27,9 +27,9 @@ $string = $doctrine . $rulez . 'even' . 'more' . $string; -$string .=$doctrine; $string .= $doctrine; -$string .=$doctrine; +$string .= $doctrine; +$string .= $doctrine; $string = $doctrine . $rulez . diff --git a/tests/fixed/not_spacing.php b/tests/fixed/not_spacing.php index 121d591a..8b8d2216 100644 --- a/tests/fixed/not_spacing.php +++ b/tests/fixed/not_spacing.php @@ -11,7 +11,7 @@ } elseif (! $test === 0) { echo 0; } else { - echo -1; + echo - 1; } while (! true) { diff --git a/tests/fixed/semicolon_spacing.php b/tests/fixed/semicolon_spacing.php index fa6c43ab..fc5ead98 100644 --- a/tests/fixed/semicolon_spacing.php +++ b/tests/fixed/semicolon_spacing.php @@ -2,7 +2,7 @@ declare(strict_types=1); -echo -1; +echo - 1; echo 'foo'; diff --git a/tests/fixed/trailing_comma_on_array.php b/tests/fixed/trailing_comma_on_array.php index f4ae3f96..b2eba5b8 100644 --- a/tests/fixed/trailing_comma_on_array.php +++ b/tests/fixed/trailing_comma_on_array.php @@ -2,7 +2,7 @@ declare(strict_types=1); -$array = [ +$array = [ 'key1' => 'value', 'key2' => 'value', ]; diff --git a/tests/input/binary_operators.php b/tests/input/binary_operators.php new file mode 100644 index 00000000..643dd5b3 --- /dev/null +++ b/tests/input/binary_operators.php @@ -0,0 +1,11 @@ +=10; +}