diff --git a/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php b/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php index 85d711eec2..d3be55bb1c 100644 --- a/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php +++ b/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php @@ -455,7 +455,7 @@ protected function processAuthor($phpcsFile, array $tags) $local = '\da-zA-Z-_+'; // Dot character cannot be the first or last character in the local-part. $localMiddle = $local.'.\w'; - if (preg_match('/^([^<]*)\s+<(['.$local.'](['.$localMiddle.']*['.$local.'])*@[\da-zA-Z][-.\w]*[\da-zA-Z]\.[a-zA-Z]{2,7})>$/', $content) === 0) { + if (preg_match('/^([^<]*)\s+<(['.$local.'](['.$localMiddle.']*['.$local.'])*@[\da-zA-Z][-.\w]*[\da-zA-Z]\.[a-zA-Z]{2,})>$/', $content) === 0) { $error = 'Content of the @author tag must be in the form "Display Name "'; $phpcsFile->addError($error, $tag, 'InvalidAuthors'); } diff --git a/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.inc b/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.inc index d58d6372f8..0b18fa38a7 100644 --- a/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.inc +++ b/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.inc @@ -39,6 +39,7 @@ declare(encoding='utf-8'); * @summary An unknown summary tag * @package '' * @subpackage !! +* @author Code AUthor */ require_once '/some/path.php'; ?> diff --git a/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php b/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php index edb40b2760..119277ae9a 100644 --- a/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php +++ b/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php @@ -40,7 +40,7 @@ public function getErrorList() 35 => 1, 40 => 2, 41 => 2, - 42 => 1, + 43 => 1, ]; }//end getErrorList() @@ -60,7 +60,7 @@ public function getWarningList() 29 => 1, 30 => 1, 34 => 1, - 42 => 1, + 43 => 1, ]; }//end getWarningList()