aboutsummaryrefslogtreecommitdiffstats
path: root/build/code_sniffer
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-06-15 21:46:24 +0200
committerTristan Darricau <github@nicofuma.fr>2014-06-16 22:35:42 +0200
commit99a2f2fdb4d3f617f09ca248bf526b7ec97ba7aa (patch)
treeac1a3f52af53c6c1b2495d5898499547793e3d48 /build/code_sniffer
parent09fc008e62453352cb34f4391acda310ea8b41c7 (diff)
downloadforums-99a2f2fdb4d3f617f09ca248bf526b7ec97ba7aa.tar
forums-99a2f2fdb4d3f617f09ca248bf526b7ec97ba7aa.tar.gz
forums-99a2f2fdb4d3f617f09ca248bf526b7ec97ba7aa.tar.bz2
forums-99a2f2fdb4d3f617f09ca248bf526b7ec97ba7aa.tar.xz
forums-99a2f2fdb4d3f617f09ca248bf526b7ec97ba7aa.zip
[ticket/12721] Add Squiz.ControlStructures.ForEachLoopDeclaration
PHPBB3-12721
Diffstat (limited to 'build/code_sniffer')
-rw-r--r--build/code_sniffer/ruleset-php-legacy.xml3
1 files changed, 3 insertions, 0 deletions
diff --git a/build/code_sniffer/ruleset-php-legacy.xml b/build/code_sniffer/ruleset-php-legacy.xml
index 0f95cee957..f060e8e14f 100644
--- a/build/code_sniffer/ruleset-php-legacy.xml
+++ b/build/code_sniffer/ruleset-php-legacy.xml
@@ -48,6 +48,9 @@
<!-- Verifies that there are not elseif statements. The else and the if should be separated by a space. -->
<rule ref="Squiz.ControlStructures.ElseIfDeclaration" />
+ <!-- There should be a space between each element of a foreach loop and the as keyword should be lowercase. -->
+ <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration" />
+
<!-- In the argument list, there MUST NOT be a space before each comma,
and there MUST be one space after each comma. -->
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">