mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
apply rector rules on list interfaces
This commit is contained in:
parent
73bc95306e
commit
f10c50231f
@ -15,6 +15,7 @@ use Chill\MainBundle\Export\AggregatorInterface;
|
|||||||
use Chill\MainBundle\Export\DirectExportInterface;
|
use Chill\MainBundle\Export\DirectExportInterface;
|
||||||
use Chill\MainBundle\Export\ExportInterface;
|
use Chill\MainBundle\Export\ExportInterface;
|
||||||
use Chill\MainBundle\Export\FilterInterface;
|
use Chill\MainBundle\Export\FilterInterface;
|
||||||
|
use Chill\MainBundle\Export\ListInterface;
|
||||||
use PhpParser\Node;
|
use PhpParser\Node;
|
||||||
use Rector\Core\Rector\AbstractRector;
|
use Rector\Core\Rector\AbstractRector;
|
||||||
use Rector\Symfony\NodeAnalyzer\ClassAnalyzer;
|
use Rector\Symfony\NodeAnalyzer\ClassAnalyzer;
|
||||||
@ -51,6 +52,7 @@ class ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector extends Abstra
|
|||||||
&& !$this->classAnalyzer->hasImplements($node, AggregatorInterface::class)
|
&& !$this->classAnalyzer->hasImplements($node, AggregatorInterface::class)
|
||||||
&& !$this->classAnalyzer->hasImplements($node, ExportInterface::class)
|
&& !$this->classAnalyzer->hasImplements($node, ExportInterface::class)
|
||||||
&& !$this->classAnalyzer->hasImplements($node, DirectExportInterface::class)
|
&& !$this->classAnalyzer->hasImplements($node, DirectExportInterface::class)
|
||||||
|
&& !$this->classAnalyzer->hasImplements($node, ListInterface::class)
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,135 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Export\ListInterface;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
class MyClass implements ListInterface
|
||||||
|
{
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
// TODO: Implement getTitle() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
// TODO: Implement buildForm() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAllowedFormattersTypes()
|
||||||
|
{
|
||||||
|
// TODO: Implement getAllowedFormattersTypes() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription()
|
||||||
|
{
|
||||||
|
// TODO: Implement getDescription() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabels($key, array $values, $data)
|
||||||
|
{
|
||||||
|
// TODO: Implement getLabels() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryKeys($data)
|
||||||
|
{
|
||||||
|
// TODO: Implement getQueryKeys() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getResult($query, $data)
|
||||||
|
{
|
||||||
|
// TODO: Implement getResult() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getType()
|
||||||
|
{
|
||||||
|
// TODO: Implement getType() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||||
|
{
|
||||||
|
// TODO: Implement initiateQuery() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function requiredRole(): string
|
||||||
|
{
|
||||||
|
// TODO: Implement requiredRole() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function supportsModifiers()
|
||||||
|
{
|
||||||
|
// TODO: Implement supportsModifiers() method.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
-----
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Export\ListInterface;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
class MyClass implements ListInterface
|
||||||
|
{
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
// TODO: Implement getTitle() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
// TODO: Implement buildForm() method.
|
||||||
|
}
|
||||||
|
public function getFormDefaultData(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAllowedFormattersTypes()
|
||||||
|
{
|
||||||
|
// TODO: Implement getAllowedFormattersTypes() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription()
|
||||||
|
{
|
||||||
|
// TODO: Implement getDescription() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabels($key, array $values, $data)
|
||||||
|
{
|
||||||
|
// TODO: Implement getLabels() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryKeys($data)
|
||||||
|
{
|
||||||
|
// TODO: Implement getQueryKeys() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getResult($query, $data)
|
||||||
|
{
|
||||||
|
// TODO: Implement getResult() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getType()
|
||||||
|
{
|
||||||
|
// TODO: Implement getType() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||||
|
{
|
||||||
|
// TODO: Implement initiateQuery() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function requiredRole(): string
|
||||||
|
{
|
||||||
|
// TODO: Implement requiredRole() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function supportsModifiers()
|
||||||
|
{
|
||||||
|
// TODO: Implement supportsModifiers() method.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user