2020-08-01 01:08:16 +02:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2021-10-26 00:21:45 +00:00
|
|
|
namespace RectorPrefix20211026;
|
2020-08-01 01:08:16 +02:00
|
|
|
|
2020-10-14 06:24:29 +02:00
|
|
|
use Rector\Defluent\Rector\ClassMethod\ReturnThisRemoveRector;
|
|
|
|
use Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector;
|
|
|
|
use Rector\Defluent\Rector\MethodCall\InArgFluentChainMethodCallToStandaloneMethodCallRector;
|
|
|
|
use Rector\Defluent\Rector\MethodCall\MethodCallOnSetterMethodCallToStandaloneAssignRector;
|
|
|
|
use Rector\Defluent\Rector\MethodCall\NewFluentChainMethodCallToNonFluentRector;
|
|
|
|
use Rector\Defluent\Rector\Return_\DefluentReturnMethodCallRector;
|
|
|
|
use Rector\Defluent\Rector\Return_\ReturnFluentChainMethodCallToNormalMethodCallRector;
|
|
|
|
use Rector\Defluent\Rector\Return_\ReturnNewFluentChainMethodCallToNonFluentRector;
|
2021-06-02 10:21:10 +00:00
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
2020-08-01 01:08:16 +02:00
|
|
|
// @see https://ocramius.github.io/blog/fluent-interfaces-are-evil/
|
|
|
|
// @see https://www.yegor256.com/2018/03/13/fluent-interfaces.html
|
2021-06-02 10:21:10 +00:00
|
|
|
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
2020-08-01 01:08:16 +02:00
|
|
|
$services = $containerConfigurator->services();
|
2020-10-14 06:24:29 +02:00
|
|
|
// variable/property
|
2021-05-10 22:23:08 +00:00
|
|
|
$services->set(\Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector::class);
|
|
|
|
$services->set(\Rector\Defluent\Rector\Return_\ReturnFluentChainMethodCallToNormalMethodCallRector::class);
|
2020-10-14 06:24:29 +02:00
|
|
|
// new
|
2021-05-10 22:23:08 +00:00
|
|
|
$services->set(\Rector\Defluent\Rector\MethodCall\NewFluentChainMethodCallToNonFluentRector::class);
|
|
|
|
$services->set(\Rector\Defluent\Rector\Return_\ReturnNewFluentChainMethodCallToNonFluentRector::class);
|
|
|
|
$services->set(\Rector\Defluent\Rector\ClassMethod\ReturnThisRemoveRector::class);
|
|
|
|
$services->set(\Rector\Defluent\Rector\Return_\DefluentReturnMethodCallRector::class);
|
|
|
|
$services->set(\Rector\Defluent\Rector\MethodCall\MethodCallOnSetterMethodCallToStandaloneAssignRector::class);
|
|
|
|
$services->set(\Rector\Defluent\Rector\MethodCall\InArgFluentChainMethodCallToStandaloneMethodCallRector::class);
|
2020-08-01 01:08:16 +02:00
|
|
|
};
|