Skip to content

Commit

Permalink
fixed file-comment-sniff for small files (#355)
Browse files Browse the repository at this point in the history
* fixed file-comment-sniff for small files

* rewrite fix to follow coding standards
  • Loading branch information
shinobu authored and white-gecko committed Jun 9, 2016
1 parent c7dc7f7 commit 5622fbc
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -67,7 +67,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
}

$noGit = true;
if (count($tokens) > 15) {
if (count($tokens) > ($commentStart + 14)) {
preg_match("/ ([0-9]{4})(-[0-9]{4})?/", $tokens[$commentStart + 15]['content'], $nonGitYear);
}

Expand Down

0 comments on commit 5622fbc

Please sign in to comment.