From 8ee0d44437ebb87b2eece46794bfe0f2ba210ad8 Mon Sep 17 00:00:00 2001 From: Klaus Purer <klaus.purer@gmail.com> Date: Fri, 27 Jan 2012 20:53:53 +0100 Subject: [PATCH] Renamed this coding standard to Drupal and renamed all sniff classes. --- .../CommentParser/FunctionCommentParser.php | 18 +++++++++--------- .../CommentParser/ParameterElement.php | 4 ++-- .../CommentParser/ReturnElement.php | 2 +- .../Docs/Files/IncludingFileStandard.xml | 0 .../Docs/Files/LineLengthStandard.xml | 0 .../FunctionCallArgumentSpacingStandard.xml | 0 .../FunctionCallSignatureStandard.xml | 0 .../Functions/ValidDefaultValueStandard.xml | 0 .../ValidClassNameStandard.xml | 0 .../ValidFunctionNameStandard.xml | 0 .../Sniffs/Array/ArraySniff.php | 6 +++--- .../Sniffs/CSS/IndentationSniff.php | 4 ++-- .../Classes/ClassCreateInstanceSniff.php | 2 +- .../Sniffs/Classes/ClassDeclarationSniff.php | 2 +- .../Sniffs/Classes/VarKeywordSniff.php | 4 ++-- .../Commenting/DocCommentAlignmentSniff.php | 6 +++--- .../Sniffs/Commenting/FileCommentSniff.php | 2 +- .../Sniffs/Commenting/FunctionCommentSniff.php | 4 ++-- .../Sniffs/Commenting/InlineCommentSniff.php | 6 +++--- .../ControlSignatureSniff.php | 4 ++-- .../Sniffs/ControlStructures/ElseIfSniff.php | 2 +- .../ControlStructures/ElseNewlineSniff.php | 4 ++-- .../InlineControlStructureSniff.php | 6 +++--- .../TemplateControlStructureSniff.php | 4 ++-- .../Sniffs/Files/LineLengthSniff.php | 6 +++--- .../Sniffs/Files/TxtFileLineLengthSniff.php | 6 +++--- .../Formatting/DisallowCloseTagSniff.php | 4 ++-- .../Formatting/MultiLineAssignmentSniff.php | 4 ++-- .../Sniffs/Formatting/SpaceOperatorSniff.php | 6 +++--- .../Formatting/SpaceUnaryOperatorSniff.php | 6 +++--- .../Functions/FunctionCallSignatureSniff.php | 4 ++-- .../Functions/FunctionDeclarationSniff.php | 4 ++-- .../Sniffs/InfoFiles/ClassFilesSniff.php | 4 ++-- .../Sniffs/InfoFiles/RequiredSniff.php | 6 +++--- .../NamingConventions/ValidClassNameSniff.php | 6 +++--- .../ValidFunctionNameSniff.php | 6 +++--- .../ValidVariableNameSniff.php | 6 +++--- .../Sniffs/Semantics/FunctionCall.php | 4 ++-- .../Sniffs/Semantics/FunctionTQuotesSniff.php | 4 ++-- .../Semantics/LStringTranslatableSniff.php | 4 ++-- .../Sniffs/Semantics/TInHookSchemaSniff.php | 4 ++-- .../Strings/ConcatenationSpacingSniff.php | 6 +++--- .../Strings/UnnecessaryStringConcatSniff.php | 4 ++-- .../ControlStructureSpacingSniff.php | 6 +++--- .../Sniffs/WhiteSpace/EmptyLinesSniff.php | 6 +++--- .../Sniffs/WhiteSpace/FileEndSniff.php | 6 +++--- .../Sniffs/WhiteSpace/LineEndingSniff.php | 2 +- .../WhiteSpace/ObjectOperatorIndentSniff.php | 6 +++--- .../WhiteSpace/ObjectOperatorSpacingSniff.php | 4 ++-- .../WhiteSpace/ScopeClosingBraceSniff.php | 6 +++--- {DrupalCodingStandard => Drupal}/ruleset.xml | 12 ++++++------ README.txt | 6 +++--- 52 files changed, 114 insertions(+), 114 deletions(-) rename {DrupalCodingStandard => Drupal}/CommentParser/FunctionCommentParser.php (74%) rename {DrupalCodingStandard => Drupal}/CommentParser/ParameterElement.php (92%) rename {DrupalCodingStandard => Drupal}/CommentParser/ReturnElement.php (96%) rename {DrupalCodingStandard => Drupal}/Docs/Files/IncludingFileStandard.xml (100%) rename {DrupalCodingStandard => Drupal}/Docs/Files/LineLengthStandard.xml (100%) rename {DrupalCodingStandard => Drupal}/Docs/Functions/FunctionCallArgumentSpacingStandard.xml (100%) rename {DrupalCodingStandard => Drupal}/Docs/Functions/FunctionCallSignatureStandard.xml (100%) rename {DrupalCodingStandard => Drupal}/Docs/Functions/ValidDefaultValueStandard.xml (100%) rename {DrupalCodingStandard => Drupal}/Docs/NamingConventions/ValidClassNameStandard.xml (100%) rename {DrupalCodingStandard => Drupal}/Docs/NamingConventions/ValidFunctionNameStandard.xml (100%) rename {DrupalCodingStandard => Drupal}/Sniffs/Array/ArraySniff.php (97%) rename {DrupalCodingStandard => Drupal}/Sniffs/CSS/IndentationSniff.php (95%) rename {DrupalCodingStandard => Drupal}/Sniffs/Classes/ClassCreateInstanceSniff.php (95%) rename {DrupalCodingStandard => Drupal}/Sniffs/Classes/ClassDeclarationSniff.php (97%) rename {DrupalCodingStandard => Drupal}/Sniffs/Classes/VarKeywordSniff.php (88%) rename {DrupalCodingStandard => Drupal}/Sniffs/Commenting/DocCommentAlignmentSniff.php (94%) rename {DrupalCodingStandard => Drupal}/Sniffs/Commenting/FileCommentSniff.php (97%) rename {DrupalCodingStandard => Drupal}/Sniffs/Commenting/FunctionCommentSniff.php (98%) rename {DrupalCodingStandard => Drupal}/Sniffs/Commenting/InlineCommentSniff.php (97%) rename {DrupalCodingStandard => Drupal}/Sniffs/ControlStructures/ControlSignatureSniff.php (90%) rename {DrupalCodingStandard => Drupal}/Sniffs/ControlStructures/ElseIfSniff.php (95%) rename {DrupalCodingStandard => Drupal}/Sniffs/ControlStructures/ElseNewlineSniff.php (91%) rename {DrupalCodingStandard => Drupal}/Sniffs/ControlStructures/InlineControlStructureSniff.php (94%) rename {DrupalCodingStandard => Drupal}/Sniffs/ControlStructures/TemplateControlStructureSniff.php (90%) rename {DrupalCodingStandard => Drupal}/Sniffs/Files/LineLengthSniff.php (92%) rename {DrupalCodingStandard => Drupal}/Sniffs/Files/TxtFileLineLengthSniff.php (88%) rename {DrupalCodingStandard => Drupal}/Sniffs/Formatting/DisallowCloseTagSniff.php (88%) rename {DrupalCodingStandard => Drupal}/Sniffs/Formatting/MultiLineAssignmentSniff.php (95%) rename {DrupalCodingStandard => Drupal}/Sniffs/Formatting/SpaceOperatorSniff.php (94%) rename {DrupalCodingStandard => Drupal}/Sniffs/Formatting/SpaceUnaryOperatorSniff.php (92%) rename {DrupalCodingStandard => Drupal}/Sniffs/Functions/FunctionCallSignatureSniff.php (98%) rename {DrupalCodingStandard => Drupal}/Sniffs/Functions/FunctionDeclarationSniff.php (97%) rename {DrupalCodingStandard => Drupal}/Sniffs/InfoFiles/ClassFilesSniff.php (97%) rename {DrupalCodingStandard => Drupal}/Sniffs/InfoFiles/RequiredSniff.php (88%) rename {DrupalCodingStandard => Drupal}/Sniffs/NamingConventions/ValidClassNameSniff.php (90%) rename {DrupalCodingStandard => Drupal}/Sniffs/NamingConventions/ValidFunctionNameSniff.php (93%) rename {DrupalCodingStandard => Drupal}/Sniffs/NamingConventions/ValidVariableNameSniff.php (95%) rename {DrupalCodingStandard => Drupal}/Sniffs/Semantics/FunctionCall.php (97%) rename {DrupalCodingStandard => Drupal}/Sniffs/Semantics/FunctionTQuotesSniff.php (92%) rename {DrupalCodingStandard => Drupal}/Sniffs/Semantics/LStringTranslatableSniff.php (88%) rename {DrupalCodingStandard => Drupal}/Sniffs/Semantics/TInHookSchemaSniff.php (94%) rename {DrupalCodingStandard => Drupal}/Sniffs/Strings/ConcatenationSpacingSniff.php (83%) rename {DrupalCodingStandard => Drupal}/Sniffs/Strings/UnnecessaryStringConcatSniff.php (94%) rename {DrupalCodingStandard => Drupal}/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php (92%) rename {DrupalCodingStandard => Drupal}/Sniffs/WhiteSpace/EmptyLinesSniff.php (90%) rename {DrupalCodingStandard => Drupal}/Sniffs/WhiteSpace/FileEndSniff.php (92%) rename {DrupalCodingStandard => Drupal}/Sniffs/WhiteSpace/LineEndingSniff.php (94%) rename {DrupalCodingStandard => Drupal}/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php (95%) rename {DrupalCodingStandard => Drupal}/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php (90%) rename {DrupalCodingStandard => Drupal}/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php (95%) rename {DrupalCodingStandard => Drupal}/ruleset.xml (90%) diff --git a/DrupalCodingStandard/CommentParser/FunctionCommentParser.php b/Drupal/CommentParser/FunctionCommentParser.php similarity index 74% rename from DrupalCodingStandard/CommentParser/FunctionCommentParser.php rename to Drupal/CommentParser/FunctionCommentParser.php index 870d6f2a..3f25787b 100644 --- a/DrupalCodingStandard/CommentParser/FunctionCommentParser.php +++ b/Drupal/CommentParser/FunctionCommentParser.php @@ -18,20 +18,20 @@ * @author Klaus Purer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_CommentParser_FunctionCommentParser extends PHP_CodeSniffer_CommentParser_FunctionCommentParser +class Drupal_CommentParser_FunctionCommentParser extends PHP_CodeSniffer_CommentParser_FunctionCommentParser { /** * The parameter elements within this function comment. * - * @var array(DrupalCodingStandard_CommentParser_ParameterElement) + * @var array(Drupal_CommentParser_ParameterElement) */ protected $params = array(); /** * The return element in this function comment. * - * @var DrupalCodingStandard_CommentParser_ReturnElement + * @var Drupal_CommentParser_ReturnElement */ protected $return = null; @@ -41,11 +41,11 @@ class DrupalCodingStandard_CommentParser_FunctionCommentParser extends PHP_CodeS * * @param array(string) $tokens The tokens that conmpise this sub element. * - * @return DrupalCodingStandard_CommentParser_ParameterElement + * @return Drupal_CommentParser_ParameterElement */ protected function parseParam($tokens) { - $param = new DrupalCodingStandard_CommentParser_ParameterElement( + $param = new Drupal_CommentParser_ParameterElement( $this->previousElement, $tokens, $this->phpcsFile @@ -62,11 +62,11 @@ class DrupalCodingStandard_CommentParser_FunctionCommentParser extends PHP_CodeS * * @param array(string) $tokens The tokens that comprise this sub element. * - * @return DrupalCodingStandard_CommentParser_ReturnElement + * @return Drupal_CommentParser_ReturnElement */ protected function parseReturn($tokens) { - $return = new DrupalCodingStandard_CommentParser_ReturnElement( + $return = new Drupal_CommentParser_ReturnElement( $this->previousElement, $tokens, 'return', @@ -85,7 +85,7 @@ class DrupalCodingStandard_CommentParser_FunctionCommentParser extends PHP_CodeS * Returns an empty array if no parameter elements are contained within * this function comment. * - * @return array(DrupalCodingStandard_CommentParser_ParameterElement) + * @return array(Drupal_CommentParser_ParameterElement) */ public function getParams() { @@ -99,7 +99,7 @@ class DrupalCodingStandard_CommentParser_FunctionCommentParser extends PHP_CodeS * * Returns null if no return element exists in the comment. * - * @return DrupalCodingStandard_CommentParser_ReturnElement + * @return Drupal_CommentParser_ReturnElement */ public function getReturn() { diff --git a/DrupalCodingStandard/CommentParser/ParameterElement.php b/Drupal/CommentParser/ParameterElement.php similarity index 92% rename from DrupalCodingStandard/CommentParser/ParameterElement.php rename to Drupal/CommentParser/ParameterElement.php index cea08439..f8266668 100644 --- a/DrupalCodingStandard/CommentParser/ParameterElement.php +++ b/Drupal/CommentParser/ParameterElement.php @@ -18,12 +18,12 @@ * @author Klaus Purer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_CommentParser_ParameterElement extends PHP_CodeSniffer_CommentParser_ParameterElement +class Drupal_CommentParser_ParameterElement extends PHP_CodeSniffer_CommentParser_ParameterElement { /** - * Constructs a DrupalCodingStandard_CommentParser_ParameterElement. + * Constructs a Drupal_CommentParser_ParameterElement. * * @param PHP_CodeSniffer_CommentParser_DocElement $previousElement The element * previous to diff --git a/DrupalCodingStandard/CommentParser/ReturnElement.php b/Drupal/CommentParser/ReturnElement.php similarity index 96% rename from DrupalCodingStandard/CommentParser/ReturnElement.php rename to Drupal/CommentParser/ReturnElement.php index 1858067f..59068b82 100644 --- a/DrupalCodingStandard/CommentParser/ReturnElement.php +++ b/Drupal/CommentParser/ReturnElement.php @@ -20,7 +20,7 @@ * @author Klaus Purer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_CommentParser_ReturnElement extends PHP_CodeSniffer_CommentParser_PairElement +class Drupal_CommentParser_ReturnElement extends PHP_CodeSniffer_CommentParser_PairElement { /** diff --git a/DrupalCodingStandard/Docs/Files/IncludingFileStandard.xml b/Drupal/Docs/Files/IncludingFileStandard.xml similarity index 100% rename from DrupalCodingStandard/Docs/Files/IncludingFileStandard.xml rename to Drupal/Docs/Files/IncludingFileStandard.xml diff --git a/DrupalCodingStandard/Docs/Files/LineLengthStandard.xml b/Drupal/Docs/Files/LineLengthStandard.xml similarity index 100% rename from DrupalCodingStandard/Docs/Files/LineLengthStandard.xml rename to Drupal/Docs/Files/LineLengthStandard.xml diff --git a/DrupalCodingStandard/Docs/Functions/FunctionCallArgumentSpacingStandard.xml b/Drupal/Docs/Functions/FunctionCallArgumentSpacingStandard.xml similarity index 100% rename from DrupalCodingStandard/Docs/Functions/FunctionCallArgumentSpacingStandard.xml rename to Drupal/Docs/Functions/FunctionCallArgumentSpacingStandard.xml diff --git a/DrupalCodingStandard/Docs/Functions/FunctionCallSignatureStandard.xml b/Drupal/Docs/Functions/FunctionCallSignatureStandard.xml similarity index 100% rename from DrupalCodingStandard/Docs/Functions/FunctionCallSignatureStandard.xml rename to Drupal/Docs/Functions/FunctionCallSignatureStandard.xml diff --git a/DrupalCodingStandard/Docs/Functions/ValidDefaultValueStandard.xml b/Drupal/Docs/Functions/ValidDefaultValueStandard.xml similarity index 100% rename from DrupalCodingStandard/Docs/Functions/ValidDefaultValueStandard.xml rename to Drupal/Docs/Functions/ValidDefaultValueStandard.xml diff --git a/DrupalCodingStandard/Docs/NamingConventions/ValidClassNameStandard.xml b/Drupal/Docs/NamingConventions/ValidClassNameStandard.xml similarity index 100% rename from DrupalCodingStandard/Docs/NamingConventions/ValidClassNameStandard.xml rename to Drupal/Docs/NamingConventions/ValidClassNameStandard.xml diff --git a/DrupalCodingStandard/Docs/NamingConventions/ValidFunctionNameStandard.xml b/Drupal/Docs/NamingConventions/ValidFunctionNameStandard.xml similarity index 100% rename from DrupalCodingStandard/Docs/NamingConventions/ValidFunctionNameStandard.xml rename to Drupal/Docs/NamingConventions/ValidFunctionNameStandard.xml diff --git a/DrupalCodingStandard/Sniffs/Array/ArraySniff.php b/Drupal/Sniffs/Array/ArraySniff.php similarity index 97% rename from DrupalCodingStandard/Sniffs/Array/ArraySniff.php rename to Drupal/Sniffs/Array/ArraySniff.php index d7cb9421..3dabcd13 100644 --- a/DrupalCodingStandard/Sniffs/Array/ArraySniff.php +++ b/Drupal/Sniffs/Array/ArraySniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Array_ArraySniff. + * Drupal_Sniffs_Array_ArraySniff. * * PHP version 5 * @@ -10,7 +10,7 @@ */ /** - * DrupalCodingStandard_Sniffs_Array_ArraySniff. + * Drupal_Sniffs_Array_ArraySniff. * * Checks if the array's are styled in the Drupal way. * - Comma after the last array element @@ -20,7 +20,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Array_ArraySniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Array_ArraySniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/CSS/IndentationSniff.php b/Drupal/Sniffs/CSS/IndentationSniff.php similarity index 95% rename from DrupalCodingStandard/Sniffs/CSS/IndentationSniff.php rename to Drupal/Sniffs/CSS/IndentationSniff.php index 902697dc..3ee75196 100644 --- a/DrupalCodingStandard/Sniffs/CSS/IndentationSniff.php +++ b/Drupal/Sniffs/CSS/IndentationSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_CSS_IndentationSniff. + * Drupal_Sniffs_CSS_IndentationSniff. * * PHP version 5 * @@ -17,7 +17,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_CSS_IndentationSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_CSS_IndentationSniff implements PHP_CodeSniffer_Sniff { /** diff --git a/DrupalCodingStandard/Sniffs/Classes/ClassCreateInstanceSniff.php b/Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php similarity index 95% rename from DrupalCodingStandard/Sniffs/Classes/ClassCreateInstanceSniff.php rename to Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php index 78897626..35f0de24 100644 --- a/DrupalCodingStandard/Sniffs/Classes/ClassCreateInstanceSniff.php +++ b/Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php @@ -20,7 +20,7 @@ * @author Peter Philipp <peter.philipp@cando-image.com> * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Classes_ClassCreateInstanceSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Classes_ClassCreateInstanceSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Classes/ClassDeclarationSniff.php b/Drupal/Sniffs/Classes/ClassDeclarationSniff.php similarity index 97% rename from DrupalCodingStandard/Sniffs/Classes/ClassDeclarationSniff.php rename to Drupal/Sniffs/Classes/ClassDeclarationSniff.php index bd9de0e8..b72fa6fb 100644 --- a/DrupalCodingStandard/Sniffs/Classes/ClassDeclarationSniff.php +++ b/Drupal/Sniffs/Classes/ClassDeclarationSniff.php @@ -27,7 +27,7 @@ * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Classes_ClassDeclarationSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Classes_ClassDeclarationSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Classes/VarKeywordSniff.php b/Drupal/Sniffs/Classes/VarKeywordSniff.php similarity index 88% rename from DrupalCodingStandard/Sniffs/Classes/VarKeywordSniff.php rename to Drupal/Sniffs/Classes/VarKeywordSniff.php index 123605be..685683c8 100644 --- a/DrupalCodingStandard/Sniffs/Classes/VarKeywordSniff.php +++ b/Drupal/Sniffs/Classes/VarKeywordSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Classes_VarKeywordSniff. + * Drupal_Sniffs_Classes_VarKeywordSniff. * * PHP version 5 * @@ -16,7 +16,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Classes_VarKeywordSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Classes_VarKeywordSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Commenting/DocCommentAlignmentSniff.php b/Drupal/Sniffs/Commenting/DocCommentAlignmentSniff.php similarity index 94% rename from DrupalCodingStandard/Sniffs/Commenting/DocCommentAlignmentSniff.php rename to Drupal/Sniffs/Commenting/DocCommentAlignmentSniff.php index 25085676..024282d9 100644 --- a/DrupalCodingStandard/Sniffs/Commenting/DocCommentAlignmentSniff.php +++ b/Drupal/Sniffs/Commenting/DocCommentAlignmentSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Commenting_EmptyCatchCommentSniff. + * Drupal_Sniffs_Commenting_EmptyCatchCommentSniff. * * PHP version 5 * @@ -11,7 +11,7 @@ */ /** - * DrupalCodingStandard_Sniffs_Commenting_DocCommentAlignmentSniff. + * Drupal_Sniffs_Commenting_DocCommentAlignmentSniff. * * Tests that the stars in a doc comment align correctly. Largely copied from * Squiz_Sniffs_Commenting_DocCommentAlignmentSniff. @@ -21,7 +21,7 @@ * @author Klaus Purer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Commenting_DocCommentAlignmentSniff implements +class Drupal_Sniffs_Commenting_DocCommentAlignmentSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Commenting/FileCommentSniff.php b/Drupal/Sniffs/Commenting/FileCommentSniff.php similarity index 97% rename from DrupalCodingStandard/Sniffs/Commenting/FileCommentSniff.php rename to Drupal/Sniffs/Commenting/FileCommentSniff.php index c3a68b8a..0d55e573 100644 --- a/DrupalCodingStandard/Sniffs/Commenting/FileCommentSniff.php +++ b/Drupal/Sniffs/Commenting/FileCommentSniff.php @@ -27,7 +27,7 @@ if (class_exists('PHP_CodeSniffer_CommentParser_ClassCommentParser', true) === f * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff { /** * Returns an array of tokens this test wants to listen for. diff --git a/DrupalCodingStandard/Sniffs/Commenting/FunctionCommentSniff.php b/Drupal/Sniffs/Commenting/FunctionCommentSniff.php similarity index 98% rename from DrupalCodingStandard/Sniffs/Commenting/FunctionCommentSniff.php rename to Drupal/Sniffs/Commenting/FunctionCommentSniff.php index e01fb002..c0745521 100644 --- a/DrupalCodingStandard/Sniffs/Commenting/FunctionCommentSniff.php +++ b/Drupal/Sniffs/Commenting/FunctionCommentSniff.php @@ -19,7 +19,7 @@ * @author Klaus Purer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_Sniff { /** @@ -151,7 +151,7 @@ class DrupalCodingStandard_Sniffs_Commenting_FunctionCommentSniff implements PHP $this->_methodName = $phpcsFile->getDeclarationName($stackPtr); try { - $this->commentParser = new DrupalCodingStandard_CommentParser_FunctionCommentParser($comment, $phpcsFile); + $this->commentParser = new Drupal_CommentParser_FunctionCommentParser($comment, $phpcsFile); $this->commentParser->parse(); } catch (PHP_CodeSniffer_CommentParser_ParserException $e) { $line = ($e->getLineWithinComment() + $commentStart); diff --git a/DrupalCodingStandard/Sniffs/Commenting/InlineCommentSniff.php b/Drupal/Sniffs/Commenting/InlineCommentSniff.php similarity index 97% rename from DrupalCodingStandard/Sniffs/Commenting/InlineCommentSniff.php rename to Drupal/Sniffs/Commenting/InlineCommentSniff.php index 8ae9b3fb..9f38e5d6 100644 --- a/DrupalCodingStandard/Sniffs/Commenting/InlineCommentSniff.php +++ b/Drupal/Sniffs/Commenting/InlineCommentSniff.php @@ -1,6 +1,6 @@ <?php /** - * PHP_CodeSniffer_Sniffs_DrupalCodingStandard_Commenting_InlineCommentSniff. + * PHP_CodeSniffer_Sniffs_Drupal_Commenting_InlineCommentSniff. * * PHP version 5 * @@ -14,7 +14,7 @@ */ /** - * PHP_CodeSniffer_Sniffs_DrupalCodingStandard_Commenting_InlineCommentSniff. + * PHP_CodeSniffer_Sniffs_Drupal_Commenting_InlineCommentSniff. * * Checks that no perl-style comments are used. Checks that inline comments ("//") * have a space after //, start capitalized and end with proper punctuation. @@ -29,7 +29,7 @@ * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Commenting_InlineCommentSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Commenting_InlineCommentSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/ControlStructures/ControlSignatureSniff.php b/Drupal/Sniffs/ControlStructures/ControlSignatureSniff.php similarity index 90% rename from DrupalCodingStandard/Sniffs/ControlStructures/ControlSignatureSniff.php rename to Drupal/Sniffs/ControlStructures/ControlSignatureSniff.php index faff572b..721a4999 100644 --- a/DrupalCodingStandard/Sniffs/ControlStructures/ControlSignatureSniff.php +++ b/Drupal/Sniffs/ControlStructures/ControlSignatureSniff.php @@ -29,7 +29,7 @@ if (class_exists('PHP_CodeSniffer_Standards_AbstractPatternSniff', true) === fal * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_ControlStructures_ControlSignatureSniff extends PHP_CodeSniffer_Standards_AbstractPatternSniff +class Drupal_Sniffs_ControlStructures_ControlSignatureSniff extends PHP_CodeSniffer_Standards_AbstractPatternSniff { @@ -59,7 +59,7 @@ class DrupalCodingStandard_Sniffs_ControlStructures_ControlSignatureSniff extend 'foreach (...) {EOL', // The EOL preceding the else/elseif keywords is not detected // correctly, so we have - // DrupalCodingStandard_Sniffs_ControlStructures_ElseNewlineSniff to + // Drupal_Sniffs_ControlStructures_ElseNewlineSniff to // cover that. '}EOLelseif (...) {EOL', '}EOLelse {EOL', diff --git a/DrupalCodingStandard/Sniffs/ControlStructures/ElseIfSniff.php b/Drupal/Sniffs/ControlStructures/ElseIfSniff.php similarity index 95% rename from DrupalCodingStandard/Sniffs/ControlStructures/ElseIfSniff.php rename to Drupal/Sniffs/ControlStructures/ElseIfSniff.php index 0b5ec251..6617ca94 100644 --- a/DrupalCodingStandard/Sniffs/ControlStructures/ElseIfSniff.php +++ b/Drupal/Sniffs/ControlStructures/ElseIfSniff.php @@ -29,7 +29,7 @@ if (class_exists('PHP_CodeSniffer_Standards_AbstractPatternSniff', true) === fal * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_ControlStructures_ElseIfSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_ControlStructures_ElseIfSniff implements PHP_CodeSniffer_Sniff { /** diff --git a/DrupalCodingStandard/Sniffs/ControlStructures/ElseNewlineSniff.php b/Drupal/Sniffs/ControlStructures/ElseNewlineSniff.php similarity index 91% rename from DrupalCodingStandard/Sniffs/ControlStructures/ElseNewlineSniff.php rename to Drupal/Sniffs/ControlStructures/ElseNewlineSniff.php index e7c56f16..a3812dd8 100644 --- a/DrupalCodingStandard/Sniffs/ControlStructures/ElseNewlineSniff.php +++ b/Drupal/Sniffs/ControlStructures/ElseNewlineSniff.php @@ -14,7 +14,7 @@ * Checks that else/elseif statements start on a new line. * * Unfortunately we need this sniff because - * DrupalCodingStandard_Sniffs_ControlStructures_ControlSignatureSniff does not + * Drupal_Sniffs_ControlStructures_ControlSignatureSniff does not * detect this. * * @category PHP @@ -22,7 +22,7 @@ * @author Klaus Purer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_ControlStructures_ElseNewlineSniff implements +class Drupal_Sniffs_ControlStructures_ElseNewlineSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/ControlStructures/InlineControlStructureSniff.php b/Drupal/Sniffs/ControlStructures/InlineControlStructureSniff.php similarity index 94% rename from DrupalCodingStandard/Sniffs/ControlStructures/InlineControlStructureSniff.php rename to Drupal/Sniffs/ControlStructures/InlineControlStructureSniff.php index 811258fc..4d3c7da6 100644 --- a/DrupalCodingStandard/Sniffs/ControlStructures/InlineControlStructureSniff.php +++ b/Drupal/Sniffs/ControlStructures/InlineControlStructureSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_ControlStructures_InlineControlStructureSniff. + * Drupal_Sniffs_ControlStructures_InlineControlStructureSniff. * * PHP version 5 * @@ -14,7 +14,7 @@ */ /** - * DrupalCodingStandard_Sniffs_ControlStructures_InlineControlStructureSniff. + * Drupal_Sniffs_ControlStructures_InlineControlStructureSniff. * * Verifies that inline control statements are not present. This Sniff overides * the generic sniff because Drupal template files may use the alternative @@ -29,7 +29,7 @@ * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_ControlStructures_InlineControlStructureSniff +class Drupal_Sniffs_ControlStructures_InlineControlStructureSniff extends Generic_Sniffs_ControlStructures_InlineControlStructureSniff { diff --git a/DrupalCodingStandard/Sniffs/ControlStructures/TemplateControlStructureSniff.php b/Drupal/Sniffs/ControlStructures/TemplateControlStructureSniff.php similarity index 90% rename from DrupalCodingStandard/Sniffs/ControlStructures/TemplateControlStructureSniff.php rename to Drupal/Sniffs/ControlStructures/TemplateControlStructureSniff.php index 299d5c31..e069d4a4 100644 --- a/DrupalCodingStandard/Sniffs/ControlStructures/TemplateControlStructureSniff.php +++ b/Drupal/Sniffs/ControlStructures/TemplateControlStructureSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_ControlStructures_TemplateControlStructureSniff. + * Drupal_Sniffs_ControlStructures_TemplateControlStructureSniff. * * PHP version 5 * @@ -17,7 +17,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_ControlStructures_TemplateControlStructureSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_ControlStructures_TemplateControlStructureSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Files/LineLengthSniff.php b/Drupal/Sniffs/Files/LineLengthSniff.php similarity index 92% rename from DrupalCodingStandard/Sniffs/Files/LineLengthSniff.php rename to Drupal/Sniffs/Files/LineLengthSniff.php index 422d0dde..9f5c9669 100644 --- a/DrupalCodingStandard/Sniffs/Files/LineLengthSniff.php +++ b/Drupal/Sniffs/Files/LineLengthSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Files_LineLengthSniff. + * Drupal_Sniffs_Files_LineLengthSniff. * * PHP version 5 * @@ -18,7 +18,7 @@ if (class_exists('Generic_Sniffs_Files_LineLengthSniff', true) === false) { } /** - * DrupalCodingStandard_Sniffs_Files_LineLengthSniff. + * Drupal_Sniffs_Files_LineLengthSniff. * * Checks all lines in the file, and throws warnings if they are over 80 * characters in length. @@ -32,7 +32,7 @@ if (class_exists('Generic_Sniffs_Files_LineLengthSniff', true) === false) { * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Files_LineLengthSniff extends Generic_Sniffs_Files_LineLengthSniff +class Drupal_Sniffs_Files_LineLengthSniff extends Generic_Sniffs_Files_LineLengthSniff { /** diff --git a/DrupalCodingStandard/Sniffs/Files/TxtFileLineLengthSniff.php b/Drupal/Sniffs/Files/TxtFileLineLengthSniff.php similarity index 88% rename from DrupalCodingStandard/Sniffs/Files/TxtFileLineLengthSniff.php rename to Drupal/Sniffs/Files/TxtFileLineLengthSniff.php index 8dbc919b..b7440eb6 100644 --- a/DrupalCodingStandard/Sniffs/Files/TxtFileLineLengthSniff.php +++ b/Drupal/Sniffs/Files/TxtFileLineLengthSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Files_TxtFileLineLengthSniff. + * Drupal_Sniffs_Files_TxtFileLineLengthSniff. * * PHP version 5 * @@ -11,7 +11,7 @@ */ /** - * DrupalCodingStandard_Sniffs_Files_TxtFileLineLengthSniff. + * Drupal_Sniffs_Files_TxtFileLineLengthSniff. * * Checks all lines in a *.txt file and throws warnings if they are over 80 * characters in length. @@ -21,7 +21,7 @@ * @author Klaus Purer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Files_TxtFileLineLengthSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Files_TxtFileLineLengthSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Formatting/DisallowCloseTagSniff.php b/Drupal/Sniffs/Formatting/DisallowCloseTagSniff.php similarity index 88% rename from DrupalCodingStandard/Sniffs/Formatting/DisallowCloseTagSniff.php rename to Drupal/Sniffs/Formatting/DisallowCloseTagSniff.php index a5f87d18..a8c019e3 100644 --- a/DrupalCodingStandard/Sniffs/Formatting/DisallowCloseTagSniff.php +++ b/Drupal/Sniffs/Formatting/DisallowCloseTagSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Formatting_DisallowCloseTagSniff. + * Drupal_Sniffs_Formatting_DisallowCloseTagSniff. * * PHP version 5 * @@ -16,7 +16,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Formatting_DisallowCloseTagSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Formatting_DisallowCloseTagSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Formatting/MultiLineAssignmentSniff.php b/Drupal/Sniffs/Formatting/MultiLineAssignmentSniff.php similarity index 95% rename from DrupalCodingStandard/Sniffs/Formatting/MultiLineAssignmentSniff.php rename to Drupal/Sniffs/Formatting/MultiLineAssignmentSniff.php index f33b1f8a..54cbb34f 100644 --- a/DrupalCodingStandard/Sniffs/Formatting/MultiLineAssignmentSniff.php +++ b/Drupal/Sniffs/Formatting/MultiLineAssignmentSniff.php @@ -13,7 +13,7 @@ */ /** - * DrupalCodingStandard_Sniffs_Formatting_MultiLineAssignmentSniff. + * Drupal_Sniffs_Formatting_MultiLineAssignmentSniff. * * If an assignment goes over two lines, ensure the equal sign is indented. * @@ -25,7 +25,7 @@ * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Formatting_MultiLineAssignmentSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Formatting_MultiLineAssignmentSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Formatting/SpaceOperatorSniff.php b/Drupal/Sniffs/Formatting/SpaceOperatorSniff.php similarity index 94% rename from DrupalCodingStandard/Sniffs/Formatting/SpaceOperatorSniff.php rename to Drupal/Sniffs/Formatting/SpaceOperatorSniff.php index 2ae4fa60..6b8232ba 100644 --- a/DrupalCodingStandard/Sniffs/Formatting/SpaceOperatorSniff.php +++ b/Drupal/Sniffs/Formatting/SpaceOperatorSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Formatting_SpaceOperatorSniff. + * Drupal_Sniffs_Formatting_SpaceOperatorSniff. * * PHP version 5 * @@ -11,7 +11,7 @@ */ /** - * DrupalCodingStandard_Sniffs_Formatting_SpaceOperatorSniff. + * Drupal_Sniffs_Formatting_SpaceOperatorSniff. * * Ensures there is a single space after a operator * @@ -21,7 +21,7 @@ * @version Release: 1.2.2 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Formatting_SpaceOperatorSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Formatting_SpaceOperatorSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Formatting/SpaceUnaryOperatorSniff.php b/Drupal/Sniffs/Formatting/SpaceUnaryOperatorSniff.php similarity index 92% rename from DrupalCodingStandard/Sniffs/Formatting/SpaceUnaryOperatorSniff.php rename to Drupal/Sniffs/Formatting/SpaceUnaryOperatorSniff.php index 307b4aab..40917d1a 100644 --- a/DrupalCodingStandard/Sniffs/Formatting/SpaceUnaryOperatorSniff.php +++ b/Drupal/Sniffs/Formatting/SpaceUnaryOperatorSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Formatting_SpaceUnaryOperatorSniff. + * Drupal_Sniffs_Formatting_SpaceUnaryOperatorSniff. * * PHP version 5 * @@ -11,7 +11,7 @@ */ /** - * DrupalCodingStandard_Sniffs_Formatting_SpaceUnaryOperatorSniff. + * Drupal_Sniffs_Formatting_SpaceUnaryOperatorSniff. * * Ensures there are no spaces on increment / decrement statements. * @@ -21,7 +21,7 @@ * @version Release: 1.2.2 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Formatting_SpaceUnaryOperatorSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Formatting_SpaceUnaryOperatorSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Functions/FunctionCallSignatureSniff.php b/Drupal/Sniffs/Functions/FunctionCallSignatureSniff.php similarity index 98% rename from DrupalCodingStandard/Sniffs/Functions/FunctionCallSignatureSniff.php rename to Drupal/Sniffs/Functions/FunctionCallSignatureSniff.php index e7596d29..57f8aae6 100644 --- a/DrupalCodingStandard/Sniffs/Functions/FunctionCallSignatureSniff.php +++ b/Drupal/Sniffs/Functions/FunctionCallSignatureSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Functions_FunctionCallSignatureSniff. + * Drupal_Sniffs_Functions_FunctionCallSignatureSniff. * * PHP version 5 * @@ -25,7 +25,7 @@ * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Functions_FunctionCallSignatureSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Functions_FunctionCallSignatureSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Functions/FunctionDeclarationSniff.php b/Drupal/Sniffs/Functions/FunctionDeclarationSniff.php similarity index 97% rename from DrupalCodingStandard/Sniffs/Functions/FunctionDeclarationSniff.php rename to Drupal/Sniffs/Functions/FunctionDeclarationSniff.php index 2383c6bc..f4a3c2f1 100644 --- a/DrupalCodingStandard/Sniffs/Functions/FunctionDeclarationSniff.php +++ b/Drupal/Sniffs/Functions/FunctionDeclarationSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Functions_FunctionDeclarationSniff. + * Drupal_Sniffs_Functions_FunctionDeclarationSniff. * * PHP version 5 * @@ -25,7 +25,7 @@ * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Functions_FunctionDeclarationSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Functions_FunctionDeclarationSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/InfoFiles/ClassFilesSniff.php b/Drupal/Sniffs/InfoFiles/ClassFilesSniff.php similarity index 97% rename from DrupalCodingStandard/Sniffs/InfoFiles/ClassFilesSniff.php rename to Drupal/Sniffs/InfoFiles/ClassFilesSniff.php index da6d9727..b312f4d4 100644 --- a/DrupalCodingStandard/Sniffs/InfoFiles/ClassFilesSniff.php +++ b/Drupal/Sniffs/InfoFiles/ClassFilesSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_InfoFiles_ClassFilesSniff. + * Drupal_Sniffs_InfoFiles_ClassFilesSniff. * * PHP version 5 * @@ -17,7 +17,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_InfoFiles_ClassFilesSniff implements PHP_CodeSniffer_MultiFileSniff +class Drupal_Sniffs_InfoFiles_ClassFilesSniff implements PHP_CodeSniffer_MultiFileSniff { diff --git a/DrupalCodingStandard/Sniffs/InfoFiles/RequiredSniff.php b/Drupal/Sniffs/InfoFiles/RequiredSniff.php similarity index 88% rename from DrupalCodingStandard/Sniffs/InfoFiles/RequiredSniff.php rename to Drupal/Sniffs/InfoFiles/RequiredSniff.php index 2de56424..062df198 100644 --- a/DrupalCodingStandard/Sniffs/InfoFiles/RequiredSniff.php +++ b/Drupal/Sniffs/InfoFiles/RequiredSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_InfoFiles_RequiredSniff. + * Drupal_Sniffs_InfoFiles_RequiredSniff. * * PHP version 5 * @@ -16,7 +16,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_InfoFiles_RequiredSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_InfoFiles_RequiredSniff implements PHP_CodeSniffer_Sniff { @@ -52,7 +52,7 @@ class DrupalCodingStandard_Sniffs_InfoFiles_RequiredSniff implements PHP_CodeSni // Only run this sniff once per info file. if ($tokens[$stackPtr]['line'] === 1) { $contents = file_get_contents($phpcsFile->getFilename()); - $info = DrupalCodingStandard_Sniffs_InfoFiles_ClassFilesSniff::drupalParseInfoFormat($contents); + $info = Drupal_Sniffs_InfoFiles_ClassFilesSniff::drupalParseInfoFormat($contents); if (isset($info['name']) === false) { $error = '"name" property is missing in the info file'; $phpcsFile->addError($error, $stackPtr, 'Name'); diff --git a/DrupalCodingStandard/Sniffs/NamingConventions/ValidClassNameSniff.php b/Drupal/Sniffs/NamingConventions/ValidClassNameSniff.php similarity index 90% rename from DrupalCodingStandard/Sniffs/NamingConventions/ValidClassNameSniff.php rename to Drupal/Sniffs/NamingConventions/ValidClassNameSniff.php index 2c904a31..6af20031 100644 --- a/DrupalCodingStandard/Sniffs/NamingConventions/ValidClassNameSniff.php +++ b/Drupal/Sniffs/NamingConventions/ValidClassNameSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_NamingConventions_ValidClassNameSniff. + * Drupal_Sniffs_NamingConventions_ValidClassNameSniff. * * PHP version 5 * @@ -14,7 +14,7 @@ */ /** - * DrupalCodingStandard_Sniffs_NamingConventions_ValidClassNameSniff. + * Drupal_Sniffs_NamingConventions_ValidClassNameSniff. * * Ensures class and interface names start with a capital letter * and do not use _ separators. @@ -28,7 +28,7 @@ * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_NamingConventions_ValidClassNameSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_NamingConventions_ValidClassNameSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/NamingConventions/ValidFunctionNameSniff.php b/Drupal/Sniffs/NamingConventions/ValidFunctionNameSniff.php similarity index 93% rename from DrupalCodingStandard/Sniffs/NamingConventions/ValidFunctionNameSniff.php rename to Drupal/Sniffs/NamingConventions/ValidFunctionNameSniff.php index 957617dc..f37d8509 100644 --- a/DrupalCodingStandard/Sniffs/NamingConventions/ValidFunctionNameSniff.php +++ b/Drupal/Sniffs/NamingConventions/ValidFunctionNameSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_NamingConventions_ValidFunctionNameSniff. + * Drupal_Sniffs_NamingConventions_ValidFunctionNameSniff. * * PHP version 5 * @@ -19,7 +19,7 @@ if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false } /** - * DrupalCodingStandard_Sniffs_NamingConventions_ValidFunctionNameSniff. + * Drupal_Sniffs_NamingConventions_ValidFunctionNameSniff. * * Ensures method names are correct depending on whether they are public * or private, and that functions are named correctly. @@ -34,7 +34,7 @@ if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_NamingConventions_ValidFunctionNameSniff extends PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff +class Drupal_Sniffs_NamingConventions_ValidFunctionNameSniff extends PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff { /** diff --git a/DrupalCodingStandard/Sniffs/NamingConventions/ValidVariableNameSniff.php b/Drupal/Sniffs/NamingConventions/ValidVariableNameSniff.php similarity index 95% rename from DrupalCodingStandard/Sniffs/NamingConventions/ValidVariableNameSniff.php rename to Drupal/Sniffs/NamingConventions/ValidVariableNameSniff.php index 2142a6dd..70a79ba8 100644 --- a/DrupalCodingStandard/Sniffs/NamingConventions/ValidVariableNameSniff.php +++ b/Drupal/Sniffs/NamingConventions/ValidVariableNameSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_NamingConventions_ValidVariableNameSniff. + * Drupal_Sniffs_NamingConventions_ValidVariableNameSniff. * * PHP version 5 * @@ -10,7 +10,7 @@ */ /** - * DrupalCodingStandard_Sniffs_NamingConventions_ValidVariableNameSniff. + * Drupal_Sniffs_NamingConventions_ValidVariableNameSniff. * * Checks the naming of member variables. * @@ -18,7 +18,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_NamingConventions_ValidVariableNameSniff +class Drupal_Sniffs_NamingConventions_ValidVariableNameSniff extends PHP_CodeSniffer_Standards_AbstractVariableSniff { diff --git a/DrupalCodingStandard/Sniffs/Semantics/FunctionCall.php b/Drupal/Sniffs/Semantics/FunctionCall.php similarity index 97% rename from DrupalCodingStandard/Sniffs/Semantics/FunctionCall.php rename to Drupal/Sniffs/Semantics/FunctionCall.php index bfa30b16..f99c5ce9 100644 --- a/DrupalCodingStandard/Sniffs/Semantics/FunctionCall.php +++ b/Drupal/Sniffs/Semantics/FunctionCall.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Semantics_FunctionCall. + * Drupal_Sniffs_Semantics_FunctionCall. * * PHP version 5 * @@ -16,7 +16,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -abstract class DrupalCodingStandard_Sniffs_Semantics_FunctionCall implements PHP_CodeSniffer_Sniff +abstract class Drupal_Sniffs_Semantics_FunctionCall implements PHP_CodeSniffer_Sniff { /** diff --git a/DrupalCodingStandard/Sniffs/Semantics/FunctionTQuotesSniff.php b/Drupal/Sniffs/Semantics/FunctionTQuotesSniff.php similarity index 92% rename from DrupalCodingStandard/Sniffs/Semantics/FunctionTQuotesSniff.php rename to Drupal/Sniffs/Semantics/FunctionTQuotesSniff.php index 8d6e2019..b3aa62e4 100644 --- a/DrupalCodingStandard/Sniffs/Semantics/FunctionTQuotesSniff.php +++ b/Drupal/Sniffs/Semantics/FunctionTQuotesSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Semantics_FunctionTQuotesSniff. + * Drupal_Sniffs_Semantics_FunctionTQuotesSniff. * * PHP version 5 * @@ -17,7 +17,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Semantics_FunctionTQuotesSniff extends DrupalCodingStandard_Sniffs_Semantics_FunctionCall +class Drupal_Sniffs_Semantics_FunctionTQuotesSniff extends Drupal_Sniffs_Semantics_FunctionCall { diff --git a/DrupalCodingStandard/Sniffs/Semantics/LStringTranslatableSniff.php b/Drupal/Sniffs/Semantics/LStringTranslatableSniff.php similarity index 88% rename from DrupalCodingStandard/Sniffs/Semantics/LStringTranslatableSniff.php rename to Drupal/Sniffs/Semantics/LStringTranslatableSniff.php index 55bd16c6..f65feaf5 100644 --- a/DrupalCodingStandard/Sniffs/Semantics/LStringTranslatableSniff.php +++ b/Drupal/Sniffs/Semantics/LStringTranslatableSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Semanitcs_LStringTranslatableSniff. + * Drupal_Sniffs_Semanitcs_LStringTranslatableSniff. * * PHP version 5 * @@ -16,7 +16,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Semantics_LStringTranslatableSniff extends DrupalCodingStandard_Sniffs_Semantics_FunctionCall +class Drupal_Sniffs_Semantics_LStringTranslatableSniff extends Drupal_Sniffs_Semantics_FunctionCall { diff --git a/DrupalCodingStandard/Sniffs/Semantics/TInHookSchemaSniff.php b/Drupal/Sniffs/Semantics/TInHookSchemaSniff.php similarity index 94% rename from DrupalCodingStandard/Sniffs/Semantics/TInHookSchemaSniff.php rename to Drupal/Sniffs/Semantics/TInHookSchemaSniff.php index 8f3d130e..22c938f1 100644 --- a/DrupalCodingStandard/Sniffs/Semantics/TInHookSchemaSniff.php +++ b/Drupal/Sniffs/Semantics/TInHookSchemaSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Semanitcs_TInHookSchemaSniff. + * Drupal_Sniffs_Semanitcs_TInHookSchemaSniff. * * PHP version 5 * @@ -16,7 +16,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Semantics_TInHookSchemaSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Semantics_TInHookSchemaSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Strings/ConcatenationSpacingSniff.php b/Drupal/Sniffs/Strings/ConcatenationSpacingSniff.php similarity index 83% rename from DrupalCodingStandard/Sniffs/Strings/ConcatenationSpacingSniff.php rename to Drupal/Sniffs/Strings/ConcatenationSpacingSniff.php index a7b79fcb..5897ccf2 100644 --- a/DrupalCodingStandard/Sniffs/Strings/ConcatenationSpacingSniff.php +++ b/Drupal/Sniffs/Strings/ConcatenationSpacingSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Strings_ConcatenationSpacingSniff. + * Drupal_Sniffs_Strings_ConcatenationSpacingSniff. * * PHP version 5 * @@ -11,7 +11,7 @@ */ /** - * DrupalCodingStandard_Sniffs_Strings_ConcatenationSpacingSniff. + * Drupal_Sniffs_Strings_ConcatenationSpacingSniff. * * Makes sure there are the needed spaces between the concatenation operator (.) and * the strings being concatenated. @@ -21,7 +21,7 @@ * @author Peter Philipp <peter.philipp@cando-image.com> * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Strings_ConcatenationSpacingSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_Strings_ConcatenationSpacingSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/Strings/UnnecessaryStringConcatSniff.php b/Drupal/Sniffs/Strings/UnnecessaryStringConcatSniff.php similarity index 94% rename from DrupalCodingStandard/Sniffs/Strings/UnnecessaryStringConcatSniff.php rename to Drupal/Sniffs/Strings/UnnecessaryStringConcatSniff.php index 87cbfe34..7e215c69 100644 --- a/DrupalCodingStandard/Sniffs/Strings/UnnecessaryStringConcatSniff.php +++ b/Drupal/Sniffs/Strings/UnnecessaryStringConcatSniff.php @@ -27,7 +27,7 @@ * @version Release: 1.3.1 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_Strings_UnnecessaryStringConcatSniff extends Generic_Sniffs_Strings_UnnecessaryStringConcatSniff +class Drupal_Sniffs_Strings_UnnecessaryStringConcatSniff extends Generic_Sniffs_Strings_UnnecessaryStringConcatSniff { @@ -79,7 +79,7 @@ class DrupalCodingStandard_Sniffs_Strings_UnnecessaryStringConcatSniff extends G // Before we throw an error check if the string is longe than // the line length limit. - $lineLengthLimitSniff = new DrupalCodingStandard_Sniffs_Files_LineLengthSniff; + $lineLengthLimitSniff = new Drupal_Sniffs_Files_LineLengthSniff; $lineLenght = $lineLengthLimitSniff->getLineLength($phpcsFile, $tokens[$prev]['line']); $stringLength = ($lineLenght + strlen($tokens[$next]['content']) - 4); diff --git a/DrupalCodingStandard/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php b/Drupal/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php similarity index 92% rename from DrupalCodingStandard/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php rename to Drupal/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php index 2c8d5a10..efc01a45 100644 --- a/DrupalCodingStandard/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php +++ b/Drupal/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_WhiteSpace_ControlStructureSpacingSniff. + * Drupal_Sniffs_WhiteSpace_ControlStructureSpacingSniff. * * PHP version 5 * @@ -14,7 +14,7 @@ */ /** - * DrupalCodingStandard_Sniffs_WhiteSpace_ControlStructureSpacingSniff. + * Drupal_Sniffs_WhiteSpace_ControlStructureSpacingSniff. * * Checks that control structures have the correct spacing around brackets. Largely * copied from Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff @@ -27,7 +27,7 @@ * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_WhiteSpace_ControlStructureSpacingSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_WhiteSpace_ControlStructureSpacingSniff implements PHP_CodeSniffer_Sniff { /** diff --git a/DrupalCodingStandard/Sniffs/WhiteSpace/EmptyLinesSniff.php b/Drupal/Sniffs/WhiteSpace/EmptyLinesSniff.php similarity index 90% rename from DrupalCodingStandard/Sniffs/WhiteSpace/EmptyLinesSniff.php rename to Drupal/Sniffs/WhiteSpace/EmptyLinesSniff.php index 80c47733..41223a78 100644 --- a/DrupalCodingStandard/Sniffs/WhiteSpace/EmptyLinesSniff.php +++ b/Drupal/Sniffs/WhiteSpace/EmptyLinesSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_WhiteSpace_EmptyLinesSniff. + * Drupal_Sniffs_WhiteSpace_EmptyLinesSniff. * * PHP version 5 * @@ -11,7 +11,7 @@ */ /** - * DrupalCodingStandard_Sniffs_WhiteSpace_EmptyLinesSniff. + * Drupal_Sniffs_WhiteSpace_EmptyLinesSniff. * * Checks that there are not more than 2 empty lines following each other. * @@ -20,7 +20,7 @@ * @author Klaus Purer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_WhiteSpace_EmptyLinesSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_WhiteSpace_EmptyLinesSniff implements PHP_CodeSniffer_Sniff { /** diff --git a/DrupalCodingStandard/Sniffs/WhiteSpace/FileEndSniff.php b/Drupal/Sniffs/WhiteSpace/FileEndSniff.php similarity index 92% rename from DrupalCodingStandard/Sniffs/WhiteSpace/FileEndSniff.php rename to Drupal/Sniffs/WhiteSpace/FileEndSniff.php index 6b170d34..cd756cec 100644 --- a/DrupalCodingStandard/Sniffs/WhiteSpace/FileEndSniff.php +++ b/Drupal/Sniffs/WhiteSpace/FileEndSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_WhiteSpace_FileEndSniff. + * Drupal_Sniffs_WhiteSpace_FileEndSniff. * * PHP version 5 * @@ -11,7 +11,7 @@ */ /** - * DrupalCodingStandard_Sniffs_WhiteSpace_FileEndSniff. + * Drupal_Sniffs_WhiteSpace_FileEndSniff. * * Checks that a file ends in exactly one single new line character. * @@ -20,7 +20,7 @@ * @author Klaus Purer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_WhiteSpace_FileEndSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_WhiteSpace_FileEndSniff implements PHP_CodeSniffer_Sniff { /** diff --git a/DrupalCodingStandard/Sniffs/WhiteSpace/LineEndingSniff.php b/Drupal/Sniffs/WhiteSpace/LineEndingSniff.php similarity index 94% rename from DrupalCodingStandard/Sniffs/WhiteSpace/LineEndingSniff.php rename to Drupal/Sniffs/WhiteSpace/LineEndingSniff.php index 566af8d9..f3f0e33f 100644 --- a/DrupalCodingStandard/Sniffs/WhiteSpace/LineEndingSniff.php +++ b/Drupal/Sniffs/WhiteSpace/LineEndingSniff.php @@ -1,6 +1,6 @@ <?php -class DrupalCodingStandard_Sniffs_WhiteSpace_LineEndingSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_WhiteSpace_LineEndingSniff implements PHP_CodeSniffer_Sniff { /** diff --git a/DrupalCodingStandard/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php b/Drupal/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php similarity index 95% rename from DrupalCodingStandard/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php rename to Drupal/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php index 57a95b7f..587accb2 100644 --- a/DrupalCodingStandard/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php +++ b/Drupal/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_WhiteSpace_ObjectOperatorIndentSniff. + * Drupal_Sniffs_WhiteSpace_ObjectOperatorIndentSniff. * * PHP version 5 * @@ -13,7 +13,7 @@ */ /** - * DrupalCodingStandard_Sniffs_WhiteSpace_ObjectOperatorIndentSniff. + * Drupal_Sniffs_WhiteSpace_ObjectOperatorIndentSniff. * * Checks that object operators are indented 2 spaces if they are the first * thing on a line. @@ -26,7 +26,7 @@ * @version Release: 1.2.0RC3 * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_WhiteSpace_ObjectOperatorIndentSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_WhiteSpace_ObjectOperatorIndentSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php b/Drupal/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php similarity index 90% rename from DrupalCodingStandard/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php rename to Drupal/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php index f28c88da..631158c0 100644 --- a/DrupalCodingStandard/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php +++ b/Drupal/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff. + * Drupal_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff. * * PHP version 5 * @@ -16,7 +16,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php b/Drupal/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php similarity index 95% rename from DrupalCodingStandard/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php rename to Drupal/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php index 8e079570..21376db7 100644 --- a/DrupalCodingStandard/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php +++ b/Drupal/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php @@ -1,6 +1,6 @@ <?php /** - * DrupalCodingStandard_Sniffs_Whitespace_ScopeClosingBraceSniff. + * Drupal_Sniffs_Whitespace_ScopeClosingBraceSniff. * * PHP version 5 * @@ -14,7 +14,7 @@ */ /** - * DrupalCodingStandard_Sniffs_Whitespace_ScopeClosingBraceSniff. + * Drupal_Sniffs_Whitespace_ScopeClosingBraceSniff. * * Checks that the closing braces of scopes are aligned correctly. * @@ -27,7 +27,7 @@ * @version Release: 1.2.2 * @link http://Drupal.php.net/package/PHP_CodeSniffer */ -class DrupalCodingStandard_Sniffs_WhiteSpace_ScopeClosingBraceSniff implements PHP_CodeSniffer_Sniff +class Drupal_Sniffs_WhiteSpace_ScopeClosingBraceSniff implements PHP_CodeSniffer_Sniff { diff --git a/DrupalCodingStandard/ruleset.xml b/Drupal/ruleset.xml similarity index 90% rename from DrupalCodingStandard/ruleset.xml rename to Drupal/ruleset.xml index 1985646d..77a5b43b 100644 --- a/DrupalCodingStandard/ruleset.xml +++ b/Drupal/ruleset.xml @@ -1,25 +1,25 @@ <?xml version="1.0"?> <!-- See http://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php --> -<ruleset name="DrupalCodingStandard"> +<ruleset name="Drupal"> <description>Drupal coding standard</description> - <rule ref="DrupalCodingStandard.Commenting.FileComment"> + <rule ref="Drupal.Commenting.FileComment"> <!-- Do not run this sniff on txt files. --> <exclude-pattern>*.txt</exclude-pattern> </rule> - <rule ref="DrupalCodingStandard.ControlStructures.ControlSignature"> + <rule ref="Drupal.ControlStructures.ControlSignature"> <!-- Do not run this sniff on template files. --> <exclude-pattern>*.tpl.php</exclude-pattern> </rule> - <rule ref="DrupalCodingStandard.ControlStructures.ElseNewline"> + <rule ref="Drupal.ControlStructures.ElseNewline"> <!-- Do not run this sniff on template files. --> <exclude-pattern>*.tpl.php</exclude-pattern> </rule> - <rule ref="DrupalCodingStandard.Formatting.DisallowCloseTag"> + <rule ref="Drupal.Formatting.DisallowCloseTag"> <!-- Do not run this sniff on template files. --> <exclude-pattern>*.tpl.php</exclude-pattern> </rule> - <rule ref="DrupalCodingStandard.WhiteSpace.ScopeClosingBrace"> + <rule ref="Drupal.WhiteSpace.ScopeClosingBrace"> <!-- Do not run this sniff on template files. --> <exclude-pattern>*.tpl.php</exclude-pattern> </rule> diff --git a/README.txt b/README.txt index 51895745..05de5b3f 100644 --- a/README.txt +++ b/README.txt @@ -17,13 +17,13 @@ Requirements: - Sym-link the drupalcs directory into the standards folder for PHP_CodeSniffer. The code for that looks like this: -$> sudo ln -sv /path/to/drupalcs/DrupalCodingStandard $(pear config-get php_dir)/PHP/CodeSniffer/Standards +$> sudo ln -sv /path/to/drupalcs/Drupal $(pear config-get php_dir)/PHP/CodeSniffer/Standards Usage (running in a shell) -------------------------- -$> phpcs --standard=DrupalCodingStandard --extensions=php,module,inc,install,test,profile,theme /path/to/drupal_module +$> phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme /path/to/drupal_module Installation in Eclipse @@ -37,7 +37,7 @@ Eclipse PTI (Php Tools Integration) : http://www.phpsrc.org - Install PTI Plugin - Configure PTI: - Open Eclipse preferences -> PHP Tools -> PHP Codesniffer: - - Add a new "CodeSniffer Standard" - choose the folder DrupalCodingStandard in this module. + - Add a new "CodeSniffer Standard" - choose the folder Drupal in this module. - Activate the library by checking the checkbox next to its name. - Make sure the Standard Tab Widht configuration is set to 0. Otherwise you won't get notified about evil tabs in the code. -- GitLab