mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 03:35:01 +01:00
* [DowngradePhp70] Add DowngradeSpaceshipRector * register to downgrade-php70 config set * CS fix * phpstan * [ci-review] Rector Rectify * property fetch * more fixtures * implemented, skip namespaced variable * implemented, skip namespaced variable * better approach * use variable named left, right * move to new variable battleShipCompare * [ci-review] Rector Rectify * final touch Co-authored-by: kaizen-ci <info@kaizen-ci.org>
25 lines
1.1 KiB
PHP
25 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Rector\Core\Configuration\Option;
|
|
use Rector\Core\ValueObject\PhpVersion;
|
|
use Rector\DowngradePhp70\Rector\Coalesce\DowngradeNullCoalesceRector;
|
|
use Rector\DowngradePhp70\Rector\Declare_\DowngradeStrictTypeDeclarationRector;
|
|
use Rector\DowngradePhp70\Rector\FunctionLike\DowngradeTypeDeclarationRector;
|
|
use Rector\DowngradePhp70\Rector\New_\DowngradeAnonymousClassRector;
|
|
use Rector\DowngradePhp70\Rector\Spaceship\DowngradeSpaceshipRector;
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
$parameters = $containerConfigurator->parameters();
|
|
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_56);
|
|
|
|
$services = $containerConfigurator->services();
|
|
$services->set(DowngradeTypeDeclarationRector::class);
|
|
$services->set(DowngradeStrictTypeDeclarationRector::class);
|
|
$services->set(DowngradeAnonymousClassRector::class);
|
|
$services->set(DowngradeNullCoalesceRector::class);
|
|
$services->set(DowngradeSpaceshipRector::class);
|
|
};
|