Skip to content

Commit

Permalink
Merge branch 'fix-ajaxnullcomparison-sniff' of https://github.com/Mar…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Apr 3, 2019
2 parents ce2aa58 + 5cbef5e commit 89888ba
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ public function process(File $phpcsFile, $stackPtr)
// Make sure it is an API function. We know this by the doc comment.
$commentEnd = $phpcsFile->findPrevious(T_DOC_COMMENT_CLOSE_TAG, $stackPtr);
$commentStart = $phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, ($commentEnd - 1));
$comment = $phpcsFile->getTokensAsString($commentStart, ($commentEnd - $commentStart));
// If function doesn't contain any doc comments - skip it.
if ($commentEnd === false || $commentStart === false) {
return;
}

$comment = $phpcsFile->getTokensAsString($commentStart, ($commentEnd - $commentStart));
if (strpos($comment, '* @api') === false) {
return;
}
Expand Down

0 comments on commit 89888ba

Please sign in to comment.