|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +/** |
| 6 | + * This file is part of domprojects/codeigniter4-breadcrumb. |
| 7 | + * |
| 8 | + * (c) domProjects |
| 9 | + * |
| 10 | + * For the full copyright and license information, please view |
| 11 | + * the LICENSE file that was distributed with this source code. |
| 12 | + */ |
| 13 | + |
| 14 | +use Rector\Caching\ValueObject\Storage\FileCacheStorage; |
| 15 | +use Rector\Config\RectorConfig; |
| 16 | +use Rector\PHPUnit\Set\PHPUnitSetList; |
| 17 | +use Rector\Set\ValueObject\LevelSetList; |
| 18 | +use Rector\Set\ValueObject\SetList; |
| 19 | +use Rector\ValueObject\PhpVersion; |
| 20 | + |
| 21 | +return static function (RectorConfig $rectorConfig): void { |
| 22 | + $rectorConfig->sets([ |
| 23 | + SetList::DEAD_CODE, |
| 24 | + LevelSetList::UP_TO_PHP_82, |
| 25 | + PHPUnitSetList::PHPUNIT_CODE_QUALITY, |
| 26 | + PHPUnitSetList::PHPUNIT_100, |
| 27 | + ]); |
| 28 | + |
| 29 | + $rectorConfig->parallel(); |
| 30 | + $rectorConfig->cacheClass(FileCacheStorage::class); |
| 31 | + |
| 32 | + if (is_dir('/tmp')) { |
| 33 | + $rectorConfig->cacheDirectory('/tmp/rector'); |
| 34 | + } |
| 35 | + |
| 36 | + $rectorConfig->paths([ |
| 37 | + __DIR__ . '/src/', |
| 38 | + __DIR__ . '/tests/', |
| 39 | + ]); |
| 40 | + |
| 41 | + $rectorConfig->autoloadPaths([ |
| 42 | + __DIR__ . '/../../../vendor/autoload.php', |
| 43 | + ]); |
| 44 | + |
| 45 | + $rectorConfig->bootstrapFiles([ |
| 46 | + __DIR__ . '/tests/bootstrap.php', |
| 47 | + ]); |
| 48 | + |
| 49 | + if (is_file(__DIR__ . '/phpstan.neon.dist')) { |
| 50 | + $rectorConfig->phpstanConfig(__DIR__ . '/phpstan.neon.dist'); |
| 51 | + } |
| 52 | + |
| 53 | + $rectorConfig->phpVersion(PhpVersion::PHP_82); |
| 54 | + $rectorConfig->importNames(); |
| 55 | + |
| 56 | + $rectorConfig->skip([ |
| 57 | + __DIR__ . '/tests/_support', |
| 58 | + ]); |
| 59 | +}; |
0 commit comments