mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44: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;
|
||||
}
|
||||
|
||||
$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
|
||||
{
|
||||
|
||||
public function test()
|
||||
{
|
||||
$this->expectException('FooException');
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
final class MyTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function testThrowExceptionWhenOperatorIsInvalid(): void
|
||||
{
|
||||
$this->expectException('Phpml\Exception\InvalidArgumentException');
|
||||
|
Loading…
x
Reference in New Issue
Block a user