mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-29 11:33:33 +01:00
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
services:
|
|
Rector\PSR4\Rector\Namespace_\NormalizeNamespaceByPSR4ComposerAutoloadRector: ~
|
|
|
|
parameters:
|
|
exclude_paths:
|
|
- "/Fixture/"
|
|
- "/Expected/"
|
|
- "/Source/"
|
|
- "packages/Symfony/src/Bridge/DefaultAnalyzedSymfonyApplicationContainer.php"
|
|
- "src/Testing/PHPUnit/AbstractRectorTestCase.php"
|
|
- "packages/Php/tests/Rector/Name/ReservedObjectRector/*"
|
|
|
|
# autoload-buggy cases
|
|
- "*.php.inc"
|
|
|
|
# so Rector code is still PHP 7.2 compatible
|
|
php_version_features: '7.2'
|
|
|
|
# @see utils/RectorGenerator/config/config.yaml
|
|
rector_recipe:
|
|
# run "bin/rector create" to create a new Rector + tests from this config
|
|
package: "Rector"
|
|
name: "SwapClassMethodArgumentsRector"
|
|
node_types:
|
|
# put main node first, it is used to create namespace
|
|
- "StaticCall"
|
|
- "MethodCall"
|
|
- "ClassMethod"
|
|
|
|
description: "Reorder class method arguments, including their calls"
|
|
code_before: >
|
|
<?php
|
|
|
|
class SomeClass
|
|
{
|
|
public static function run($first, $second)
|
|
{
|
|
self::run($first, $second);
|
|
}
|
|
}
|
|
|
|
code_after: >
|
|
<?php
|
|
|
|
class SomeClass
|
|
{
|
|
public static function run($second, $first)
|
|
{
|
|
self::run($second, $first);
|
|
}
|
|
}
|
|
|
|
source: # e.g. link to RFC or headline in upgrade guide, 1 or more in the list
|
|
- ""
|
|
set: "" # e.g. symfony30, target config to append this rector to
|