mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
dad1e77265
fafa4013f6
Cleanup few duplicated test fixtures, fix SimplifyEmptyCheckOnEmptyArrayRector test namespace (#6056)
27 lines
914 B
PHP
27 lines
914 B
PHP
<?php
|
|
|
|
// this is part of downgrade build
|
|
declare (strict_types=1);
|
|
namespace RectorPrefix202406;
|
|
|
|
use RectorPrefix202406\Symfony\Component\Finder\Finder;
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
$finder = Finder::create()->in(__DIR__ . '/../rules-tests')->directories()->name('#Rector$#')->getIterator();
|
|
$ruleToFixtureCount = [];
|
|
foreach ($finder as $rectorTestDirectory) {
|
|
if ($rectorTestDirectory->getBasename() === 'Rector') {
|
|
continue;
|
|
}
|
|
$fixtureCount = Finder::create()->files()->name('*.php.inc')->in($rectorTestDirectory->getPathname())->count();
|
|
// very few fixture files, not relevant
|
|
if ($fixtureCount <= 15) {
|
|
continue;
|
|
}
|
|
$ruleToFixtureCount[$rectorTestDirectory->getBasename()] = $fixtureCount;
|
|
}
|
|
\asort($ruleToFixtureCount);
|
|
foreach ($ruleToFixtureCount as $rule => $fixtureCount) {
|
|
echo ' * ' . $rule . ': ';
|
|
echo $fixtureCount . \PHP_EOL;
|
|
}
|