diff --git a/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRector.php b/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRector.php index 1dd0cfa50..bac7d66a0 100644 --- a/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRector.php +++ b/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRector.php @@ -12,13 +12,14 @@ declare(strict_types=1); namespace Chill\Utils\Rector\Rector; use Chill\MainBundle\Test\Export\AbstractAggregatorTest; -use Chill\Utils\Rector\Tests\ChillBundleMakeDataProviderStaticForAbstractFilterTest\ChillBundleMakeDataProviderStaticForAbstractFilterTestTest; +use Chill\Utils\Rector\Tests\ChillBundleMakeDataProviderStaticForAbstractFilterTest\ChillBundleMakeDataProviderStaticForAbstractFilterTestRectorTest; use PhpParser\Node; use Rector\Rector\AbstractRector; +use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** - * @see ChillBundleMakeDataProviderStaticForAbstractFilterTestTest + * @see ChillBundleMakeDataProviderStaticForAbstractFilterTestRectorTest */ final class ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRector extends AbstractRector { @@ -26,7 +27,9 @@ final class ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRector ext { return new RuleDefinition( 'Make static each method which provide data on AbstractAggregatorTest', - [''] + [ + new CodeSample('', ''), + ] ); } @@ -70,7 +73,6 @@ final class ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRector ext $method->returnType = match ($stmt->name->name) { 'getFormData' => new Node\Identifier('array'), 'getQueryBuilders' => new Node\Identifier('iterable'), - default => throw new \UnexpectedValueException('this name is not supported: '.$stmt->name->name) }; foreach ($stmt->getStmts() as $s) { diff --git a/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractExportTestRector.php b/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractExportTestRector.php index 95a7c6b43..fc2f7a3f4 100644 --- a/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractExportTestRector.php +++ b/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractExportTestRector.php @@ -12,13 +12,18 @@ declare(strict_types=1); namespace Chill\Utils\Rector\Rector; use Chill\MainBundle\Test\Export\AbstractExportTest; -use Chill\Utils\Rector\Tests\ChillBundleMakeDataProviderStaticForAbstractFilterTest\ChillBundleMakeDataProviderStaticForAbstractFilterTestTest; +use Chill\Utils\Rector\Tests\ChillBundleMakeDataProviderStaticForAbstractExportTestRectorTest\ChillBundleMakeDataProviderStaticForAbstractExportTestRectorTest; use PhpParser\Node; use Rector\Rector\AbstractRector; +use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** - * @see ChillBundleMakeDataProviderStaticForAbstractFilterTestTest + * Class ChillBundleMakeDataProviderStaticForAbstractExportTestRector. + * + * This class is responsible for making each method that provides data on AbstractExportTest static. + * + * @see ChillBundleMakeDataProviderStaticForAbstractExportTestRectorTest for testing */ final class ChillBundleMakeDataProviderStaticForAbstractExportTestRector extends AbstractRector { @@ -26,7 +31,9 @@ final class ChillBundleMakeDataProviderStaticForAbstractExportTestRector extends { return new RuleDefinition( 'Make static each method which provide data on AbstractExportTest', - [''] + [ + new CodeSample('', ''), + ] ); } @@ -70,7 +77,6 @@ final class ChillBundleMakeDataProviderStaticForAbstractExportTestRector extends $method->returnType = match ($stmt->name->name) { 'getFormData' => new Node\Identifier('array'), 'getModifiersCombination' => new Node\Identifier('array'), - default => throw new \UnexpectedValueException('this name is not supported: '.$stmt->name->name) }; foreach ($stmt->getStmts() as $s) { diff --git a/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractFilterTestRector.php b/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractFilterTestRector.php index 82176cec1..053b9e5c0 100644 --- a/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractFilterTestRector.php +++ b/utils/rector/src/Rector/ChillBundleMakeDataProviderStaticForAbstractFilterTestRector.php @@ -12,13 +12,14 @@ declare(strict_types=1); namespace Chill\Utils\Rector\Rector; use Chill\MainBundle\Test\Export\AbstractFilterTest; -use Chill\Utils\Rector\Tests\ChillBundleMakeDataProviderStaticForAbstractFilterTest\ChillBundleMakeDataProviderStaticForAbstractFilterTestTest; +use Chill\Utils\Rector\Tests\ChillBundleMakeDataProviderStaticForAbstractFilterTest\ChillBundleMakeDataProviderStaticForAbstractFilterTestRectorTest; use PhpParser\Node; use Rector\Rector\AbstractRector; +use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** - * @see ChillBundleMakeDataProviderStaticForAbstractFilterTestTest + * @see ChillBundleMakeDataProviderStaticForAbstractFilterTestRectorTest */ final class ChillBundleMakeDataProviderStaticForAbstractFilterTestRector extends AbstractRector { @@ -26,7 +27,9 @@ final class ChillBundleMakeDataProviderStaticForAbstractFilterTestRector extends { return new RuleDefinition( 'Make static each method which provide data', - [''] + [ + new CodeSample('', ''), + ] ); } @@ -70,7 +73,6 @@ final class ChillBundleMakeDataProviderStaticForAbstractFilterTestRector extends $method->returnType = match ($stmt->name->name) { 'getFormData' => new Node\Identifier('array'), 'getQueryBuilders' => new Node\Identifier('iterable'), - default => throw new \UnexpectedValueException('this name is not supported: '.$stmt->name->name) }; foreach ($stmt->getStmts() as $s) {