Skip to content

Commit

Permalink
Fix prefixed scoped DataProvider class on NamedArgumentForDataProvide…
Browse files Browse the repository at this point in the history
…rRector (#347)

* Fix prefixed scoped DataProvider class on NamedArgumentForDataProviderRector

* [ci-review] Rector Rectify

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
samsonasik and actions-user authored Jun 30, 2024
1 parent b3529d4 commit 73233a0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Return_;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
Expand Down Expand Up @@ -184,7 +183,7 @@ public function getResolvedVariables(array $stmts): array

private function getDataProviderMethodName(ClassMethod $classMethod): string|null
{
$attributeClassName = DataProvider::class;
$attributeClassName = 'PHPUnit\Framework\Attributes\DataProvider';
foreach ($classMethod->attrGroups as $attributeGroup) {
foreach ($attributeGroup->attrs as $attribute) {
if (! $this->isName($attribute->name, $attributeClassName)) {
Expand Down

0 comments on commit 73233a0

Please sign in to comment.