Skip to content

Commit fa5daef

Browse files
committed
Merge branch '2.15' into 2.16
2 parents a0cf954 + 9640a31 commit fa5daef

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/Fixer/Phpdoc/PhpdocSeparationFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private function fixDescription(DocBlock $doc)
102102
if ($line->containsUsefulContent()) {
103103
$next = $doc->getLine($index + 1);
104104

105-
if ($next->containsATag()) {
105+
if (null !== $next && $next->containsATag()) {
106106
$line->addBlank();
107107

108108
break;

tests/Fixer/Phpdoc/PhpdocSeparationFixerTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,18 @@ public function testLargerEmptyDocBlock()
573573
*
574574
*/
575575

576+
EOF;
577+
578+
$this->doTest($expected);
579+
}
580+
581+
public function testOneLineDocBlock()
582+
{
583+
$expected = <<<'EOF'
584+
<?php
585+
/** Foo */
586+
const Foo = 1;
587+
576588
EOF;
577589

578590
$this->doTest($expected);

0 commit comments

Comments
 (0)