| 1 |
<?php |
| 2 |
/** |
| 3 |
* Rector configuration |
| 4 |
* |
| 5 |
* @package Parsely |
| 6 |
*/ |
| 7 |
|
| 8 |
declare(strict_types=1); |
| 9 |
|
| 10 |
use Rector\Config\RectorConfig; |
| 11 |
use Rector\Php54\Rector\Array_\LongArrayToShortArrayRector; |
| 12 |
use Rector\Set\ValueObject\LevelSetList; |
| 13 |
|
| 14 |
return static function ( RectorConfig $rector_config ): void { |
| 15 |
$rector_config->bootstrapFiles( |
| 16 |
array( |
| 17 |
__DIR__ . '/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php', |
| 18 |
) |
| 19 |
); |
| 20 |
|
| 21 |
$rector_config->paths( |
| 22 |
array( |
| 23 |
__DIR__ . '/src', |
| 24 |
__DIR__ . '/tests', |
| 25 |
__DIR__ . '/uninstall.php', |
| 26 |
__DIR__ . '/wp-parsely.php', |
| 27 |
) |
| 28 |
); |
| 29 |
|
| 30 |
// Define sets of rules. |
| 31 |
$rector_config->sets( |
| 32 |
array( |
| 33 |
LevelSetList::UP_TO_PHP_72, |
| 34 |
) |
| 35 |
); |
| 36 |
$rector_config->skip( |
| 37 |
array( |
| 38 |
LongArrayToShortArrayRector::class, |
| 39 |
) |
| 40 |
); |
| 41 |
|
| 42 |
$rector_config->indent( "\t", 1 ); |
| 43 |
}; |
| 44 |
|