Loading coder_sniffer/Drupal/Sniffs/Commenting/DataTypeNamespaceSniff.php +3 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use PHP_CodeSniffer\Sniffs\Sniff; use PHP_CodeSniffer\Util\Tokens; /** * Checks that data types in param, return, var tags are fully namespaced. * Checks that data types in param, return, var, and throws tags are fully namespaced. * * @category PHP * @package PHP_CodeSniffer Loading Loading @@ -90,7 +90,8 @@ class DataTypeNamespaceSniff implements Sniff while ($tag !== false) { if (($tokens[$tag]['content'] === '@var' || $tokens[$tag]['content'] === '@return' || $tokens[$tag]['content'] === '@param') || $tokens[$tag]['content'] === '@param' || $tokens[$tag]['content'] === '@throws') && isset($tokens[($tag + 1)]) === true && $tokens[($tag + 1)]['code'] === T_DOC_COMMENT_WHITESPACE && isset($tokens[($tag + 2)]) === true Loading coder_sniffer/Drupal/Test/Commenting/DataTypeNamespaceUnitTest.inc +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ class Test { * * @return TestClass * Yep. * * @throws TestClass */ public function test1(TestClass $y) { return $y; Loading coder_sniffer/Drupal/Test/Commenting/DataTypeNamespaceUnitTest.inc.fixed +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ class Test { * * @return \Some\Namespaced\TestClass * Yep. * * @throws \Some\Namespaced\TestClass */ public function test1(TestClass $y) { return $y; Loading coder_sniffer/Drupal/Test/Commenting/DataTypeNamespaceUnitTest.php +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,8 @@ class DataTypeNamespaceUnitTest extends CoderSniffUnitTest return array( 15 => 1, 18 => 1, 29 => 1, 21 => 1, 31 => 1, ); }//end getErrorList() Loading Loading
coder_sniffer/Drupal/Sniffs/Commenting/DataTypeNamespaceSniff.php +3 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use PHP_CodeSniffer\Sniffs\Sniff; use PHP_CodeSniffer\Util\Tokens; /** * Checks that data types in param, return, var tags are fully namespaced. * Checks that data types in param, return, var, and throws tags are fully namespaced. * * @category PHP * @package PHP_CodeSniffer Loading Loading @@ -90,7 +90,8 @@ class DataTypeNamespaceSniff implements Sniff while ($tag !== false) { if (($tokens[$tag]['content'] === '@var' || $tokens[$tag]['content'] === '@return' || $tokens[$tag]['content'] === '@param') || $tokens[$tag]['content'] === '@param' || $tokens[$tag]['content'] === '@throws') && isset($tokens[($tag + 1)]) === true && $tokens[($tag + 1)]['code'] === T_DOC_COMMENT_WHITESPACE && isset($tokens[($tag + 2)]) === true Loading
coder_sniffer/Drupal/Test/Commenting/DataTypeNamespaceUnitTest.inc +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ class Test { * * @return TestClass * Yep. * * @throws TestClass */ public function test1(TestClass $y) { return $y; Loading
coder_sniffer/Drupal/Test/Commenting/DataTypeNamespaceUnitTest.inc.fixed +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ class Test { * * @return \Some\Namespaced\TestClass * Yep. * * @throws \Some\Namespaced\TestClass */ public function test1(TestClass $y) { return $y; Loading
coder_sniffer/Drupal/Test/Commenting/DataTypeNamespaceUnitTest.php +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,8 @@ class DataTypeNamespaceUnitTest extends CoderSniffUnitTest return array( 15 => 1, 18 => 1, 29 => 1, 21 => 1, 31 => 1, ); }//end getErrorList() Loading