rector/rector.yaml

53 lines
1.5 KiB
YAML
Raw Normal View History

2019-03-31 23:20:51 +02:00
parameters:
exclude_paths:
- "/Fixture/"
2019-04-29 06:18:05 +02:00
- "/Expected/"
2019-04-29 06:09:00 +02:00
- "/Source/"
- "packages/Symfony/src/Bridge/DefaultAnalyzedSymfonyApplicationContainer.php"
- "src/Testing/PHPUnit/AbstractRectorTestCase.php"
- "packages/Php/tests/Rector/Name/ReservedObjectRector/*"
2019-03-31 23:20:51 +02:00
# autoload-buggy cases
- "*.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