2018-12-08 23:21:42 +01:00
|
|
|
# run "bin/rector create" to create a new Rector + tests from this config
|
2019-02-23 01:14:01 +01:00
|
|
|
package: "Celebrity"
|
|
|
|
name: "SplitToExplodeRector"
|
2018-10-15 17:10:45 +08:00
|
|
|
node_types:
|
2018-10-23 18:57:56 +02:00
|
|
|
- "Assign" # put main node first
|
2018-10-15 17:10:45 +08:00
|
|
|
|
2018-10-23 18:57:56 +02:00
|
|
|
description: "Removes unneeded $a = $a assigns"
|
2018-12-08 23:21:42 +01:00
|
|
|
code_before: |
|
|
|
|
<?php
|
2018-12-31 12:29:06 +01:00
|
|
|
|
|
|
|
class SomeClass
|
|
|
|
{
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
$a = $a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-08 23:21:42 +01:00
|
|
|
code_after: |
|
|
|
|
<?php
|
2018-12-31 12:29:06 +01:00
|
|
|
|
|
|
|
class SomeClass
|
|
|
|
{
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-08 23:21:42 +01:00
|
|
|
source: # e.g. link to RFC or headline in upgrade guide, 1 or more in the list
|
|
|
|
- ""
|
2019-02-03 18:46:45 +01:00
|
|
|
level: "" # e.g. symfony30.yaml, target config to append this rector to
|