apply rector rules on list interfaces

This commit is contained in:
2023-06-05 17:40:19 +02:00
parent a28740c46c
commit 88d363fc0c
2 changed files with 137 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Export\DirectExportInterface;
use Chill\MainBundle\Export\ExportInterface;
use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Export\ListInterface;
use PhpParser\Node;
use Rector\Core\Rector\AbstractRector;
use Rector\Symfony\NodeAnalyzer\ClassAnalyzer;
@@ -51,6 +52,7 @@ class ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector extends Abstra
&& !$this->classAnalyzer->hasImplements($node, AggregatorInterface::class)
&& !$this->classAnalyzer->hasImplements($node, ExportInterface::class)
&& !$this->classAnalyzer->hasImplements($node, DirectExportInterface::class)
&& !$this->classAnalyzer->hasImplements($node, ListInterface::class)
) {
return null;
}