mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 19:53:14 +01:00
fix storing of empty DocBlock
This commit is contained in:
parent
0e3bf4824e
commit
49c834f324
@ -233,7 +233,12 @@ final class DocBlockAnalyzer
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$node->setDocComment(new Doc($docBlock));
|
if (empty($docBlock)) {
|
||||||
|
$node->setAttribute('comments', null);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$node->setDocComment(new Doc($docBlock));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
final class MyTest extends \PHPUnit_Framework_TestCase
|
final class MyTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
$this->expectException('FooException');
|
$this->expectException('FooException');
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
final class MyTest extends \PHPUnit_Framework_TestCase
|
final class MyTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function testThrowExceptionWhenOperatorIsInvalid(): void
|
public function testThrowExceptionWhenOperatorIsInvalid(): void
|
||||||
{
|
{
|
||||||
$this->expectException('Phpml\Exception\InvalidArgumentException');
|
$this->expectException('Phpml\Exception\InvalidArgumentException');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user