rector/config/set/defluent.php
Tomas Votruba 800abda3d2
[MagicDisclosure] Improve naming (#3862)
* add FluentChain keywords together, to make easier to find the classes

* decopule AbstractFluentChainMethodCallRector
2020-08-01 15:34:08 +00:00

28 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
use Rector\MagicDisclosure\Rector\ClassMethod\ReturnThisRemoveRector;
use Rector\MagicDisclosure\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector;
use Rector\MagicDisclosure\Rector\MethodCall\InArgFluentChainMethodCallToStandaloneMethodCallRector;
use Rector\MagicDisclosure\Rector\MethodCall\MethodCallOnSetterMethodCallToStandaloneAssignRector;
use Rector\MagicDisclosure\Rector\Return_\DefluentReturnMethodCallRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
// @see https://ocramius.github.io/blog/fluent-interfaces-are-evil/
// @see https://www.yegor256.com/2018/03/13/fluent-interfaces.html
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(ReturnThisRemoveRector::class);
$services->set(DefluentReturnMethodCallRector::class);
$services->set(FluentChainMethodCallToNormalMethodCallRector::class);
$services->set(MethodCallOnSetterMethodCallToStandaloneAssignRector::class);
$services->set(InArgFluentChainMethodCallToStandaloneMethodCallRector::class);
};