Skip to content

Commit

Permalink
Don't add DisableReturnValueGenerationForTestDoubles to abstract cl…
Browse files Browse the repository at this point in the history
…asses via Rector (#78)
  • Loading branch information
ben-challis authored May 1, 2024
1 parent d9ee520 commit 153d966
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public function refactor(Node $node): ?Class_
return null;
}

if ($node->isAbstract()) {
return null;
}

if ($this->attributeAnalyzer->hasPhpAttribute($node, DisableReturnValueGenerationForTestDoubles::class)) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace Tests\Rector\Lendable\PHPUnitExtensions\Rector\Fixture;

use PHPUnit\Framework\TestCase;

abstract class AbstractWithoutAttributeTest extends TestCase
{
}

0 comments on commit 153d966

Please sign in to comment.