Skip to content

Commit

Permalink
The T_DOC_COMMENT token has been removed, replaced with T_DOC_COMMENT…
Browse files Browse the repository at this point in the history
…_OPEN_TAG
  • Loading branch information
photodude committed Jul 16, 2015
1 parent 7d68731 commit cb0eb0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/phpcs/Joomla/Sniffs/Commenting/FunctionCommentSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
{
$find = array(
T_COMMENT,
T_DOC_COMMENT,
T_DOC_COMMENT_OPEN_TAG,
T_CLASS,
T_FUNCTION,
T_OPEN_TAG,
Expand All @@ -132,7 +132,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
$error = 'You must use "/**" style comments for a function comment';
$phpcsFile->addError($error, $stackPtr, 'WrongStyle');
return;
} else if ($code !== T_DOC_COMMENT) {
} else if ($code !== T_DOC_COMMENT_OPEN_TAG) {
$phpcsFile->addError('Missing function doc comment', $stackPtr, 'Missing');
return;
}
Expand Down Expand Up @@ -162,7 +162,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)

// If the first T_OPEN_TAG is right before the comment, it is probably
// a file comment.
$commentStart = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($commentEnd - 1), null, true) + 1);
$commentStart = ($phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, ($commentEnd - 1), null, true) + 1);
$prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($commentStart - 1), null, true);
if ($tokens[$prevToken]['code'] === T_OPEN_TAG) {
// Is this the first open tag?
Expand Down

0 comments on commit cb0eb0b

Please sign in to comment.