Skip to content

Commit 6eb2c97

Browse files
author
Vincent Langlet
committed
🐛 Fix case string - custom annotation
1 parent 225878e commit 6eb2c97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Symfony3Custom/Sniffs/Commenting/DocCommentGroupSameTypeSniff.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
8787
$previousLine = max($previousStringLine, $previousTagLine);
8888

8989
$currentIsCustom = ! in_array($currentType, $this->tags);
90-
$previousIsCustom = ! in_array($previousType, $this->tags);
90+
$previousIsCustom = ($previousType !== '')
91+
&& ! in_array($previousType, $this->tags);
9192

9293
if (($previousType === $currentType)
9394
|| ($currentIsCustom && $previousIsCustom)

0 commit comments

Comments
 (0)