aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-10-29 21:27:07 +0100
committerAndreas Fischer <bantu@phpbb.com>2013-10-29 21:27:07 +0100
commitd326a49fd0daf308ca8c9b4a24f6970efeffa86c (patch)
treea5889d4ab6bb2a63df71589feb481fddf33dbf00
parent99fccb6f19e3945156ba74b67602a4a5b88e7434 (diff)
downloadforums-d326a49fd0daf308ca8c9b4a24f6970efeffa86c.tar
forums-d326a49fd0daf308ca8c9b4a24f6970efeffa86c.tar.gz
forums-d326a49fd0daf308ca8c9b4a24f6970efeffa86c.tar.bz2
forums-d326a49fd0daf308ca8c9b4a24f6970efeffa86c.tar.xz
forums-d326a49fd0daf308ca8c9b4a24f6970efeffa86c.zip
[task/code-sniffer] Check function/method argument list spacing.
PHPBB3-11980
-rw-r--r--build/code_sniffer/ruleset-php-legacy.xml9
1 files changed, 9 insertions, 0 deletions
diff --git a/build/code_sniffer/ruleset-php-legacy.xml b/build/code_sniffer/ruleset-php-legacy.xml
index ed8c7e98a0..3e5b7c4b4d 100644
--- a/build/code_sniffer/ruleset-php-legacy.xml
+++ b/build/code_sniffer/ruleset-php-legacy.xml
@@ -17,6 +17,15 @@
<!-- Method arguments with default values MUST go at the end of the argument list. -->
<rule ref="PEAR.Functions.ValidDefaultValue" />
+ <!-- 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">
+ <properties>
+ <property name="equalsSpacing" value="1"/>
+ </properties>
+ </rule>
+ <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" />
+
<!-- The ?> closing tag MUST be omitted from files containing only PHP. -->
<rule ref="Zend.Files.ClosingTag" />