Loading coder_sniffer/Drupal/Sniffs/Commenting/DeprecatedSniff.php +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ class DeprecatedSniff implements Sniff // case and numbers can be one or two digits. foreach (array('in-version' => $matches[1], 'removal-version' => $matches[2]) as $name => $version) { if (preg_match('/^drupal:\d{1,2}\.\d{1,2}\.\d{1,2}$/', $version) === 0 && preg_match('/^[a-z\d_]:\d{1,2}\.x\-\d{1,2}\.\d{1,2}$/', $version) === 0 && preg_match('/^[a-z\d_]+:\d{1,2}\.x\-\d{1,2}\.\d{1,2}$/', $version) === 0 ) { $error = "The deprecation %s '%s' does not match the standard: drupal:n.n.n or project:n.x-n.n"; $phpcsFile->addWarning($error, $stackPtr, 'DeprecatedVersionFormat', array($name, $version)); Loading coder_sniffer/Drupal/Test/Commenting/DeprecatedUnitTest.inc +8 −0 Original line number Diff line number Diff line Loading @@ -50,3 +50,11 @@ function y() { */ function z() { } /** * This doc block will also pass the 'Deprecated' standards checks. * * @deprecated in myproj:8.x-1.8 and will be removed from myproj:8.x-2.0. * This function block is OK. * @see http://www.drupal.org/node/7890 */ Loading
coder_sniffer/Drupal/Sniffs/Commenting/DeprecatedSniff.php +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ class DeprecatedSniff implements Sniff // case and numbers can be one or two digits. foreach (array('in-version' => $matches[1], 'removal-version' => $matches[2]) as $name => $version) { if (preg_match('/^drupal:\d{1,2}\.\d{1,2}\.\d{1,2}$/', $version) === 0 && preg_match('/^[a-z\d_]:\d{1,2}\.x\-\d{1,2}\.\d{1,2}$/', $version) === 0 && preg_match('/^[a-z\d_]+:\d{1,2}\.x\-\d{1,2}\.\d{1,2}$/', $version) === 0 ) { $error = "The deprecation %s '%s' does not match the standard: drupal:n.n.n or project:n.x-n.n"; $phpcsFile->addWarning($error, $stackPtr, 'DeprecatedVersionFormat', array($name, $version)); Loading
coder_sniffer/Drupal/Test/Commenting/DeprecatedUnitTest.inc +8 −0 Original line number Diff line number Diff line Loading @@ -50,3 +50,11 @@ function y() { */ function z() { } /** * This doc block will also pass the 'Deprecated' standards checks. * * @deprecated in myproj:8.x-1.8 and will be removed from myproj:8.x-2.0. * This function block is OK. * @see http://www.drupal.org/node/7890 */