Skip to content

Commit

Permalink
use older rule registration, to allow reporting of withRules() and wi…
Browse files Browse the repository at this point in the history
…thSets()
  • Loading branch information
TomasVotruba committed Feb 28, 2025
1 parent f058b83 commit 04998ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions config/sets/typed-collections.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
use Rector\Doctrine\CodeQuality\Rector\Property\ImproveDoctrineCollectionDocTypeInEntityRector;
use Rector\Doctrine\CodeQuality\Rector\Property\TypedPropertyFromToManyRelationTypeRector;

return RectorConfig::configure()
->withRules([
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rules([
ExplicitRelationCollectionRector::class,
AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector::class,
TypedPropertyFromToManyRelationTypeRector::class,
ImproveDoctrineCollectionDocTypeInEntityRector::class,
]);
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
use Rector\Config\RectorConfig;
use Rector\Doctrine\CodeQuality\Rector\Property\ImproveDoctrineCollectionDocTypeInEntityRector;

return RectorConfig::configure()
->withRules([ImproveDoctrineCollectionDocTypeInEntityRector::class]);
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rules([ImproveDoctrineCollectionDocTypeInEntityRector::class]);
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace Rector\Doctrine\CodeQuality\Rector\Class_;

use PhpParser\Node\Stmt\Function_;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\Function_;
use PhpParser\NodeVisitor;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProvider;
Expand Down

0 comments on commit 04998ca

Please sign in to comment.