Skip to content

Commit

Permalink
Merge pull request #11 from zumba/fix-abstract-case
Browse files Browse the repository at this point in the history
Fix abstract method case.
  • Loading branch information
young-steveo authored Feb 26, 2019
2 parents 12a4d03 + 4059126 commit 76f61ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Zumba/Sniffs/Commenting/FunctionCommentSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ protected function processReturn($commentStart, $commentEnd)
// parenthesis closer and the scope opener.
$functionDef = $tokens[$this->_functionToken];
$index = $functionDef['parenthesis_closer'];
$end = $functionDef['scope_opener'];
$end = empty($functionDef['scope_opener'])
? $functionDef['parenthesis_closer'] + 4 // whitespace colon whitespace name
: $functionDef['scope_opener'];
while ($index++ < $end) {
if ($tokens[$index]["code"] === \T_STRING) {
return; // we're good.
Expand Down

0 comments on commit 76f61ed

Please sign in to comment.