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 870d6f2a6865fddeee46cbc6ed05f504cf2ae928..3f25787b24672e765c6597b221bfffb6ab4d3b8b 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 cea08439eb5bd9d6e4e3f0f68d29b4b87f92b1fd..f826666874abeea8ed09c3df4e15caa57551f59a 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 1858067f0dfebc8d3d37edf28d8816e71b3b0d5c..59068b82dd1d72ccb4504d6bb890226b46f77d5f 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 d7cb94213e0985adfaa0414b54f7631b62a656f5..3dabcd13ff78951f32e875ddcaf315a7f9e8ee42 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 902697dc51d29fe8cf124b9ef3c72402fd65fb11..3ee751961d2bcc5ad9cbd484a5789e48719b6694 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 78897626634fa62fc3902a646cc35f5bc6d968bb..35f0de24f300cb2b3107da4de7bd3393df7efecb 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 bd9de0e8e4857ae7896492f6c07d3ee9f2f75a6e..b72fa6fbac3057659cd8af6e3e924ea58f122c9b 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 123605be51054ed06cf25d641c2e04db62abd606..685683c84d0efa4c19aac73c57599b682488d466 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 250856767e0993ec0d4e66f675155190e9a979be..024282d90d90dc00ec5dc70031692d68313ffb75 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 c3a68b8ab773ff9f612054e6f10e9a2f01686744..0d55e5734c3b858efacf3e77cf4d9bc0d096dd13 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 e01fb0022f31b9d25807fbef8c07c03b65165334..c0745521fe72c525ea6511260f28c008197b803b 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 8ae9b3fb5ea85a5a56e45c5adb3cbdab8e618d12..9f38e5d6db8b3b7e49f254792052363e4780d4aa 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 faff572b26ce801fab70a825c583c798457bd53f..721a4999e566a716e9d047468533fea7b3c4089b 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 0b5ec251dc30780d600ba8bb76b77cf47c0e1e59..6617ca947b049216dd6cf968550e3ec071f56115 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 e7c56f16b752202d65268e292051397785759026..a3812dd882435721977b434dd51b83e5e36cf1e5 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 811258fc4b5c8e1c2fc565df9e00e9a63f30a6dd..4d3c7da62166782e50760c15b7f376f2230d7020 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 299d5c310cecf31c499c8761e5da036b59fe6094..e069d4a43f6de8d388298fa002e379890e3bf9d8 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 422d0ddee327f53d854f484d903594d2ee8b1a59..9f5c96698afbb9688fe01971602dabfc34b6cae5 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 8dbc919b3e65dac2e6435018a346ada6b5a5bd57..b7440eb6b8914d724990b141958c6539a66c5fcd 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 a5f87d184e8cf3a721b515389809bbdfca7e70b9..a8c019e3803d61d10e19715fe699617f70df45c4 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 f33b1f8a865e922a3a87f3eb97d6a27fbb6f50e3..54cbb34f38f920dd622d8949c1fd74319d07a1b7 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 2ae4fa601d48cb34f50555dd3bece3707edcb830..6b8232baa5d74fb8daa7e5e22d76413044c9babb 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 307b4aab3bb9e6ed144bc8ae9613aee157a8012f..40917d1a18a0a821ab64e9e37a31ee61d28961f7 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 e7596d29c60ffa2183a80d8b1aa7454368e219f0..57f8aae6865a3fb8541fb0fd026cb9e4f19dde4d 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 2383c6bc662f99fc29c18347c0f8286f98200b04..f4a3c2f1133f1bec487ecd7b8f43a9037a4203b6 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 da6d9727b9b728623c73fde10c93393fa1b3bfd9..b312f4d4abba30a686bf526cefe835c128ad5472 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 2de5642422ed0a4367d3bcb03af2e09bde264caf..062df19825ebdfbb1226b49ec5fbe78b3821b9e0 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 2c904a310836237dc56986d8359a4b830bdae7db..6af2003145b82e69b94090c21707cc964150685c 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 957617dc2b6c10e21d65a9256900ce2704f71ad0..f37d8509e871b91c7b950764d210a819e5421238 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 2142a6dde701c8fc27a3f66e29106dbcae17a7d3..70a79ba814f50cdd5c93c9939fa78a45647c391e 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 bfa30b1646fc3317b681b861f418c7e6e422eee3..f99c5ce9b2464da5ebdd77137a0febf5bf05e3a7 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 8d6e20191060d30b5fddef6b1e3837c19562a051..b3aa62e4308c346d6828b7788c609bdc6397db72 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 55bd16c6271f3553dba67af83dc1e33cf629cf02..f65feaf54a058bc35fd0209e2748ec37f7b7ce5b 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 8f3d130e5214e3aa4de0463be955d705890ba9d1..22c938f1099caede3c8c4b1ca13bccc4b1b3b505 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 a7b79fcb752c53ea4bc5dd3f76c2d5a3157d4b2d..5897ccf2eac7a6e12a378c60f88868a455e50e71 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 87cbfe340f177fc6dccd384234076c51e12c25de..7e215c69994531f1524e4bab253e6148b6ef8e6c 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 2c8d5a10fe8fd3b49ca95b3d2d4366816c858122..efc01a45f86e570f043490626d953a1996e93517 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 80c47733587bb8517317e16bc4a2566cd62b5420..41223a784b37e619b0d280aa13189be692468de5 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 6b170d34319c3fda5436198fd326072729714ea3..cd756ceca224b80c78d58280be2389e594100292 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 566af8d9e5c68a4f22a8c8c3f71adefcfb497e32..f3f0e33fc590214e19032768ef379f458d630c61 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 57a95b7f80a0bcaf671ea4754954c766c6a967ed..587accb21145ab66d5db29da7977be464fdec410 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 f28c88da79c76c0aae98fd315f11d43c1639ddb0..631158c02db4171ac74ef3559193c1c56d8c3dec 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 8e079570a91df64267c6671d60578a5ce93c846c..21376db75760b6dfe1aa8294b48f24912e485713 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 1985646d1db32367eb2b0411674f4f4eb2c8ae0d..77a5b43bf73031bf3d6bcf939e672e726658a8b0 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 518957452e4efd9042d32baddd663f7873c7e3eb..05de5b3fe753c1cd5bb3ea4f74aa1a50eb2bfb0e 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.