mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
906bb39c8d
[EarlyReturn] Handle Repetitive create If_ statement on use ChangeOrIfReturnToEarlyReturnRector+RemoveAlwaysElseRector (#651)
18 lines
968 B
PHP
18 lines
968 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace RectorPrefix20210812;
|
|
|
|
use Rector\Php53\Rector\AssignRef\ClearReturnNewByReferenceRector;
|
|
use Rector\Php53\Rector\FuncCall\DirNameFileConstantToDirConstantRector;
|
|
use Rector\Php53\Rector\Ternary\TernaryToElvisRector;
|
|
use Rector\Php53\Rector\Variable\ReplaceHttpServerVarsByServerRector;
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
|
$services = $containerConfigurator->services();
|
|
$services->set(\Rector\Php53\Rector\Ternary\TernaryToElvisRector::class);
|
|
$services->set(\Rector\Php53\Rector\FuncCall\DirNameFileConstantToDirConstantRector::class);
|
|
$services->set(\Rector\Php53\Rector\AssignRef\ClearReturnNewByReferenceRector::class);
|
|
$services->set(\Rector\Php53\Rector\Variable\ReplaceHttpServerVarsByServerRector::class);
|
|
};
|