Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CakePHP/Sniffs/Commenting/FunctionCommentSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function process(File $phpcsFile, $stackPtr)
&& $tokens[$commentEnd]['code'] !== T_COMMENT
) {
$previous = $commentEnd;
if (
while (
$tokens[$commentEnd]['code'] === T_ATTRIBUTE_END
|| $tokens[$commentEnd]['code'] === T_ATTRIBUTE
) {
Expand Down
13 changes: 13 additions & 0 deletions CakePHP/Tests/Commenting/FunctionCommentUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,17 @@ class Foo
public function returnWillChange($param, $otherParam)
{
}

/**
* Some sentence.
*
* @param int $param Some Param.
* @param bool $otherParam Some Other Param.
* @return string Something.
*/
#[ReturnTypeWillChange]
#[NoDiscard]
public function withMultipleAttributes($param, $otherParam)
{
}
}
13 changes: 13 additions & 0 deletions CakePHP/Tests/Commenting/FunctionCommentUnitTest.inc.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,17 @@ class Foo
public function returnWillChange($param, $otherParam)
{
}

/**
* Some sentence.
*
* @param int $param Some Param.
* @param bool $otherParam Some Other Param.
* @return string Something.
*/
#[ReturnTypeWillChange]
#[NoDiscard]
public function withMultipleAttributes($param, $otherParam)
{
}
}
Loading