Skip to content

Commit d9a3dea

Browse files
committed
Changelog for #1015
1 parent f1c7dc6 commit d9a3dea

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ protected function processReturn(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $co
9797
}
9898
}
9999

100-
// Ignores description, that might come after return type.
101-
list($returnType,) = explode(' ', $content, 2);
100+
// Support both a return type and a description. The return type
101+
// is anything up to the first space.
102+
$returnParts = explode(' ', $content, 2);
103+
$returnType = $returnParts[0];
102104

103105
// If the return type is void, make sure there is
104106
// no return statement in the function.

package.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
4949
- Fixed bug #983 : Squiz.WhiteSpace.MemberVarSpacing.AfterComment fails to fix error when comment is not a docblock
5050
- Fixed bug #1010 : Squiz NonExectuableCode sniff does not detect boolean OR
5151
-- Thanks to Derek Henderson for the patch
52+
- Fixed bug #1015 : The Squiz.Commenting.FunctionComment sniff doesn't allow description in @return tag
53+
-- Thanks to Alexander Obuhovich for the patch
5254
</notes>
5355
<contents>
5456
<dir name="/">

0 commit comments

Comments
 (0)