Skip to content

Commit

Permalink
Merge branch '2.15' into 2.16
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Apr 10, 2020
2 parents a0cf954 + 9640a31 commit fa5daef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocSeparationFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private function fixDescription(DocBlock $doc)
if ($line->containsUsefulContent()) {
$next = $doc->getLine($index + 1);

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

break;
Expand Down
12 changes: 12 additions & 0 deletions tests/Fixer/Phpdoc/PhpdocSeparationFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,18 @@ public function testLargerEmptyDocBlock()
*
*/
EOF;

$this->doTest($expected);
}

public function testOneLineDocBlock()
{
$expected = <<<'EOF'
<?php
/** Foo */
const Foo = 1;
EOF;

$this->doTest($expected);
Expand Down

0 comments on commit fa5daef

Please sign in to comment.