8 Commits

Author SHA1 Message Date
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
Tomas Votruba
0513315056
Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node (#4522)
* Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node

* update DecoupleClassMethodToOwnClassRector

* [ci] add rebase jobp

* disable fail fast for unit tests

* misc
2020-10-31 12:59:40 +00:00
Tomas Votruba
3ed76c6559
[Nette] Add RemoveParentAndNameFromComponentConstructorRector (#4515)
* [Nette] Add RemoveParentAndNameFromComponentConstructorRector

* add refactorClassMethod()

* add refactorStaticCall()

* add refactorNew() method

* [Nette] Rename AddDatePickerToDateControlRector to AddNextrasDatePickerToDateControlRector

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-30 17:10:17 +00:00
Tomas Votruba
52ccfc0527
[DX] move Nette FileSytem to SmartFileSystem DI (#4262)
* move Nette FileSytem to SmartFileSystem DI

* move Symfony FileSytem to SmartFileSystem

* [ci] run rector diretly, without composer wrap
2020-09-19 09:27:29 +00:00
TomasVotruba
5859625d5d [Nette] Add TranslateClassMethodToVariadicsRector 2020-07-29 03:21:08 +02:00
TomasVotruba
a8a6e7bcad rename file to fileInfo 2020-06-30 01:45:05 +02:00
TomasVotruba
7f49658112 change test(string ) to test(SmartFileInfo ) in tests 2020-06-25 20:02:36 +02:00
TomasVotruba
bf722ad9b5 move nette to rules 2020-02-14 10:51:33 +01:00