diff --git a/src/Fixer/Phpdoc/PhpdocSummaryFixer.php b/src/Fixer/Phpdoc/PhpdocSummaryFixer.php index d2cfb9e5455..d706d1fb525 100644 --- a/src/Fixer/Phpdoc/PhpdocSummaryFixer.php +++ b/src/Fixer/Phpdoc/PhpdocSummaryFixer.php @@ -76,7 +76,7 @@ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void // final line of Description is NOT properly formatted !$this->isCorrectlyFormatted($content) // and first line of Description, if different than final line, does NOT indicate a list - && (1 === $end || substr(rtrim($doc->getLine(1)?->getContent() ?: ""), -1) !== ":") + && (1 === $end || ':' !== substr(rtrim($doc->getLine(1)?->getContent() ?: ''), -1)) ) { $line->setContent($content.'.'.$this->whitespacesConfig->getLineEnding()); $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]); diff --git a/tests/Fixer/Phpdoc/PhpdocSummaryFixerTest.php b/tests/Fixer/Phpdoc/PhpdocSummaryFixerTest.php index 9cbabd82f60..c34829c9c2d 100644 --- a/tests/Fixer/Phpdoc/PhpdocSummaryFixerTest.php +++ b/tests/Fixer/Phpdoc/PhpdocSummaryFixerTest.php @@ -203,7 +203,6 @@ public function testFixMultiline(): void $this->doTest($expected, $input); } - public function testWithList(): void { $expected = <<<'EOF'