From 4059126cab0e7ff727f69a2bca71b464b0f93bc7 Mon Sep 17 00:00:00 2001 From: Stephen Young Date: Tue, 26 Feb 2019 11:34:02 -0500 Subject: [PATCH] Fix abstract method case. --- Zumba/Sniffs/Commenting/FunctionCommentSniff.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Zumba/Sniffs/Commenting/FunctionCommentSniff.php b/Zumba/Sniffs/Commenting/FunctionCommentSniff.php index 8a5ea2c..c8ac1b5 100644 --- a/Zumba/Sniffs/Commenting/FunctionCommentSniff.php +++ b/Zumba/Sniffs/Commenting/FunctionCommentSniff.php @@ -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.