From 7ddc10d95b96b90973c1d021c9b12a64e9dc44ec Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Mon, 1 Jul 2019 10:37:07 +0300 Subject: [PATCH] Force camelCase variable names --- lib/Doctrine/ruleset.xml | 4 ++++ tests/expected_report.txt | 3 ++- tests/fixed/NamingCamelCase.php | 22 ++++++++++++++++++++++ tests/input/NamingCamelCase.php | 22 ++++++++++++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 tests/fixed/NamingCamelCase.php create mode 100644 tests/input/NamingCamelCase.php diff --git a/lib/Doctrine/ruleset.xml b/lib/Doctrine/ruleset.xml index 5a2a8e7f..19147308 100644 --- a/lib/Doctrine/ruleset.xml +++ b/lib/Doctrine/ruleset.xml @@ -410,6 +410,10 @@ + + + + diff --git a/tests/expected_report.txt b/tests/expected_report.txt index 6cf1696e..298ed816 100644 --- a/tests/expected_report.txt +++ b/tests/expected_report.txt @@ -18,6 +18,7 @@ tests/input/forbidden-functions.php 6 0 tests/input/inline_type_hint_assertions.php 6 0 tests/input/LowCaseTypes.php 2 0 tests/input/namespaces-spacing.php 7 0 +tests/input/NamingCamelCase.php 7 0 tests/input/new_with_parentheses.php 18 0 tests/input/not_spacing.php 8 0 tests/input/null_coalesce_operator.php 3 0 @@ -35,7 +36,7 @@ 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 271 ERRORS AND 0 WARNINGS WERE FOUND IN 32 FILES ---------------------------------------------------------------------- PHPCBF CAN FIX 216 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- diff --git a/tests/fixed/NamingCamelCase.php b/tests/fixed/NamingCamelCase.php new file mode 100644 index 00000000..86831507 --- /dev/null +++ b/tests/fixed/NamingCamelCase.php @@ -0,0 +1,22 @@ +