diff options
Diffstat (limited to 'build/code_sniffer')
-rw-r--r-- | build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php | 2 | ||||
-rw-r--r-- | build/code_sniffer/ruleset-php-legacy.xml | 15 | ||||
-rw-r--r-- | build/code_sniffer/ruleset-php-strict.xml | 12 |
3 files changed, 16 insertions, 13 deletions
diff --git a/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php b/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php index 68e9e6bb86..231e77734e 100644 --- a/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php +++ b/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php @@ -193,7 +193,7 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff */ protected function processLicense(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags) { - $license = 'http://opensource.org/licenses/gpl-license.php GNU Public License'; + $license = 'http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2'; if (!isset($tags['license'])) { diff --git a/build/code_sniffer/ruleset-php-legacy.xml b/build/code_sniffer/ruleset-php-legacy.xml index 247313441d..65eb0a8622 100644 --- a/build/code_sniffer/ruleset-php-legacy.xml +++ b/build/code_sniffer/ruleset-php-legacy.xml @@ -29,6 +29,9 @@ <!-- Method arguments with default values MUST go at the end of the argument list. --> <rule ref="PEAR.Functions.ValidDefaultValue" /> + <!-- Each file MUST end with exactly one newline character --> + <rule ref="PSR2.Files.EndFileNewline" /> + <!-- 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"> @@ -38,6 +41,18 @@ </rule> <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" /> + <!-- There MUST NOT be trailing whitespace at the end of lines. --> + <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" /> + + <!-- There MUST NOT be whitespace before the first content of a file --> + <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" /> + + <!-- There MUST NOT be whitespace after the last content of a file --> + <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" /> + + <!-- Functions MUST NOT contain multiple empty lines in a row --> + <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" /> + <!-- The ?> closing tag MUST be omitted from files containing only PHP. --> <rule ref="Zend.Files.ClosingTag" /> diff --git a/build/code_sniffer/ruleset-php-strict.xml b/build/code_sniffer/ruleset-php-strict.xml index 5e3c26a616..f2d5b86dd1 100644 --- a/build/code_sniffer/ruleset-php-strict.xml +++ b/build/code_sniffer/ruleset-php-strict.xml @@ -22,18 +22,6 @@ <!-- PHP keywords MUST be in lower case. --> <rule ref="Generic.PHP.LowerCaseKeyword" /> - <!-- There MUST NOT be trailing whitespace at the end of lines. --> - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" /> - - <!-- There MUST NOT be whitespace before the first content of a file --> - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" /> - - <!-- There MUST NOT be whitespace after the last content of a file --> - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" /> - - <!-- Functions MUST NOT contain multiple empty lines in a row --> - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" /> - <!-- Classes etc. MUST be namespaced --> <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace" /> |