Abdul Malik Ikhsan 4f6da168e0
[Nette] Do not Remove Param on RemoveParentAndNameFromComponentConstructorRector when used in Assign (#5098)
* Add failing test fixture for RemoveParentAndNameFromComponentConstructorRector

# Failing Test for RemoveParentAndNameFromComponentConstructorRector

Based on https://getrector.org/demo/12f10dc7-7ffb-4fe1-8004-7bf82e7aa9ce

There are multiple problems in this rule:
1) only $name is removed ($parent should be also removed)
2) $name (and if it would work also $parent) is removed also when there is some future use of it (e.g. assigning to private property $this->name = $name)

* Failing fixtures

* Closes #5052

* cs fix

* rename fixture

* rename fixture

* reduce complexity

* refactor

* use Assign

Co-authored-by: Michal Lulco <michal.lulco@gmail.com>
Co-authored-by: Michal Lulco <lulco@efabrica.sk>
2021-01-06 12:07:13 +01:00
..