mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Make static some methods in AbstractAggregatorTest.php + rector rule to adapt existing
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\Utils\Rector\Tests\ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRectorTest;
|
||||
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider provideData
|
||||
*/
|
||||
public function test(string $file): void
|
||||
{
|
||||
$this->doTestFile($file);
|
||||
}
|
||||
|
||||
public static function provideData(): \Iterator
|
||||
{
|
||||
return self::yieldFilesFromDirectory(__DIR__.'/Fixture');
|
||||
}
|
||||
|
||||
public function provideConfigFilePath(): string
|
||||
{
|
||||
return __DIR__.'/config/config.php';
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
class MyException extends \RuntimeException
|
||||
{
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
final readonly class MyClass {
|
||||
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return static function (Rector\Config\RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->rule(Chill\Utils\Rector\Rector\ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRector::class);
|
||||
};
|
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
class MyException extends \RuntimeException
|
||||
{
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
final readonly class MyClass {
|
||||
|
||||
}
|
@@ -10,5 +10,5 @@ declare(strict_types=1);
|
||||
*/
|
||||
|
||||
return static function (Rector\Config\RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->rule(Chill\Utils\Rector\Rector\ChillBundleMakeDataProviderStaticForAbstractFilterTesting::class);
|
||||
$rectorConfig->rule(Chill\Utils\Rector\Rector\ChillBundleMakeDataProviderStaticForAbstractFilterTestRector::class);
|
||||
};
|
||||
|
Reference in New Issue
Block a user