2019-03-31 23:20:51 +02:00
|
|
|
parameters:
|
|
|
|
exclude_paths:
|
2019-10-02 22:13:37 +02:00
|
|
|
- "/Fixture/"
|
2019-04-29 06:18:05 +02:00
|
|
|
- "/Expected/"
|
2019-04-29 06:09:00 +02:00
|
|
|
- "/Source/"
|
2019-09-15 15:55:12 +02:00
|
|
|
- "packages/Symfony/src/Bridge/DefaultAnalyzedSymfonyApplicationContainer.php"
|
|
|
|
- "src/Testing/PHPUnit/AbstractRectorTestCase.php"
|
2019-09-23 13:43:13 +02:00
|
|
|
- "packages/Php/tests/Rector/Name/ReservedObjectRector/*"
|
2019-05-26 14:43:20 +02:00
|
|
|
|
2019-03-31 23:20:51 +02:00
|
|
|
# autoload-buggy cases
|
2019-09-23 13:43:13 +02:00
|
|
|
- "*.php.inc"
|
2019-03-31 23:20:51 +02:00
|
|
|
|
|
|
|
# so Rector code is still PHP 7.1 compatible
|
|
|
|
php_version_features: '7.1'
|
2019-11-24 13:40:43 +01:00
|
|
|
|
2019-12-08 10:46:18 +01:00
|
|
|
# @see utils/RectorGenerator/config/config.yaml
|
2019-11-24 13:40:43 +01:00
|
|
|
rector_recipe:
|
2019-12-08 10:46:18 +01:00
|
|
|
# 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
|