Commit Graph

218 Commits

Author SHA1 Message Date
Tomas Votruba
8542a3bcbc
Move from Filesystem rules to FileNode (#4528)
* make MoveServicesBySuffixToDirectoryRector with non-filesystem rector

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Apply coding standards

* fixup! make MoveServicesBySuffixToDirectoryRector with non-filesystem rector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-31 21:39:09 +00:00
Tomas Votruba
5147844615
change RenameSpecFileToTestFileRector filesystem to normal one (#4525) 2020-10-31 16:20:30 +00: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
9751b9a1e8
[Decouple] Remove set, rather job for PHPStorm (#4521)
* [Decouple] Remove set, rather PHPStorm job

* update docs
2020-10-31 07:54:00 +00:00
Tomas Votruba
18d2ea2d31
[Nette] Add MoveFinalGetUserToCheckRequirementsClassMethodRector (#4520)
* [Nette] Add MoveFinalGetUserToCheckRequirementsClassMethodRector

* [Nette] Add MoveFinalGetUserToCheckRequirementsClassMethodRector

* patch final presenter to allow tests
2020-10-31 00:43:54 +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
b302e493dd
[SOLID] Add MoveVariableDeclarationNearReferenceRector (#4410)
* Create test cases

* Create rector

* Add closure to possible parent scopes

* Register in SOLID set

* Document the feature

* fix adding variable in closure

* move MoveVariableDeclarationNearReferenceRector to Assign category, based on getNodeTypes()

* ci: drop phpunit matcher, not much helpful

* ignore for now, many cases to cover

* prepare release

Co-authored-by: Anna Filina <afilina@gmail.com>
2020-10-30 13:25:24 +00:00
Tomas Votruba
dc2047f70a
[TypeDeclaration] Switch from stringy types to PHPStan types (#4510)
* nette-30 config cleanup

* [TypeDeclaratoin] Move AddReturnTypeDeclarationRector from generic

* add Type support to AddReturnTypeDeclaration

* make AddParamTypeDeclarationRector use PHPStan type objects over strings

* [SymfonyPhpConfig] Add support for nested types

* drop StringTypeToPhpParserNodeMapper

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-30 11:58:35 +00:00
Tomas Votruba
63037fe924
[DynamicTypeAnalysis] Drop for too theoretical content, needs real project to test out (#4511) 2020-10-30 00:30:10 +00:00
Abdul Malik Ikhsan
c54377da25
[Performance] Add CountArrayToEmptyArrayComparisonRector (#4489)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-28 22:59:21 +01:00
Tomas Votruba
a6e85fe69a
[PHPUnit] Fix AddSeeTestAnnotationRector for same short name, but different namespace (#4488)
* [PHPUnit] Fix AddSeeTestAnnotationRector for same short name, but different namespace

* correct namespaces
2020-10-27 00:42:04 +00:00
Tomas Votruba
6f56d0dfbe
[docs] apply correct standard on dumper Rector list + apply automated CI commit on propagate monorepo deps (#4481) 2020-10-26 00:22:53 +01:00
Tomas Votruba
0f2e6d407e
[DoctrineAnnotaitonGenerated] Update to doctrine/annotations 1.11 + fix static (#4479) 2020-10-25 14:43:05 +01:00
Abdul Malik Ikhsan
be06b60eac
Typo Fix: Strings::endWith() should be Strings::endsWith() (#4475)
* Typo Fix: Strings::endWith() should be Strings::endsWith()

* [rector] Typo Fix: Strings::endWith() should be Strings::endsWith()

* [cs] Typo Fix: Strings::endWith() should be Strings::endsWith()

* phpstan

* [rector] phpstan

* [cs] phpstan

* cs fix

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-23 11:23:12 +02:00
Tomas Votruba
6c51f3fb4f
[Restoration] Add InferParamFromClassMethodReturnRector (#4471)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-21 23:06:24 +02:00
Tomas Votruba
10ae0d687a
[CodeQuality] Add NewStaticToNewSelfRector (#4468)
* [CodeQuality] Add NewStaticToNewSelfRector

* regenerated docs

* drop patches
2020-10-20 22:01:47 +00:00
Tomas Votruba
e845d7cea8
[DoctrineCodeQuality] Add ImproveDoctrineCollectionDocTypeInEntityRector (#4442)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-18 18:29:35 +02:00
Raffael Comi
055040f8e8
Downgrade PHP7.4 array_merge without arguments (#4377) (#4440) 2020-10-18 16:37:02 +02:00
Tomas Votruba
8af70b5ac0
[Defluent] Refactoring to multiple rules (#4400)
* [Defluent] Refactoring to multiple rules

* [Defluent] Decouple defluent-only set, it deserved to have own domain

* cleanup

* [rector] cleanup

* [cs] cleanup

* fixup! cleanup

* static fixes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-14 04:24:29 +00:00
Igor
35537dba84
[SOLID] Change if && to early return (#4344)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-10 18:27:13 +02:00
Tomas Votruba
3808d1b941
[Nette 3.0] Set update (#4381) 2020-10-09 22:01:37 +02:00
Tomas Votruba
e47a806300
Remove AbstractFileSystemRector and move to AbstractRector (#4378) 2020-10-09 21:51:09 +02:00
Tomas Votruba
7d56318046
[Legacy] From file system Rector to classic Rector (#4373)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-09 10:11:22 +02:00
Tomas Votruba
5cb49a2d5a
[PSR-4] Move from FileSystemRector to FileWithoutNamespace node (#4372) 2020-10-08 23:28:24 +02:00
Tomas Votruba
8134a847fe
cs fixes (#4369) 2020-10-07 16:20:53 +02:00
TomasVotruba
44d6bc1195 update yaml params to php params 2020-10-07 15:41:19 +02:00
Tomas Votruba
a8f55f339f
[DX] Update dump nodes to not-use symfony style (#4356)
* [DX] Update dump nodes to not-use symfony style

* [rector] [DX] Update dump nodes to not-use symfony style

* [cs] [DX] Update dump nodes to not-use symfony style

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-05 09:29:07 +00:00
Tomas Votruba
1c8fac5242
Add meta node FileWithoutNamespace (#4355)
* [CakePHP] Promote AppUsesStaticCallToUseStatementRector to File

* [CakePHP] Change ImplicitShortClassNameUseStatementRector to FileWithoutNamespace approach

* [Renaming] Update PseudoNamespaceToNamespaceRector to use FileWithnoutNamespace

* [rector] [Renaming] Update PseudoNamespaceToNamespaceRector to use FileWithnoutNamespace

* [cs] [Renaming] Update PseudoNamespaceToNamespaceRector to use FileWithnoutNamespace

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-05 08:39:02 +00:00
Igor
2ef5805850
[Docs] Add missing php opening tag (#4340) 2020-10-01 23:27:55 +02:00
Tomas Votruba
8ae3868a57
[Restoration] Add RestoreFullyQualifiedNameRector (#4336)
* [Restoration] Add RestoreFullyQualifiedNameRector

* update docs

* use service aware test case for PHPStan rules

* improve FullyQualifiedNameMatcher

* cs fixes

* add return doc resolution

* composer: bump to symfony 4.4/5.1
2020-10-01 19:45:29 +00:00
Abdul Malik Ikhsan
ae816c2c3d
Fixes #4337 : Make Option::SKIP works again with ParameterProvider (#4339) 2020-10-01 18:55:10 +02:00
Igor
6350692b98
[Naming] Move UnderscoreToCamelCaseVariableNameRector to Naming set (#4312) 2020-09-28 22:35:45 +02:00
Tomas Votruba
19f83dd2b0
update docs (#4308) 2020-09-28 14:29:21 +02:00
Igor
7d5ab130fb
[Renaming] Move RenamePropertyRector to appropriate set (#4303) 2020-09-27 23:33:32 +02:00
Tomas Votruba
70bf2ea830
[DOCS] Switch DumpRectorCommand from console to string printer (#4281)
* monorepob-builder: add v prefix

* monorepob-builder: add v prefix

* bump symplify

* decouple SymfonyConsole from DumpRectorCommand

* moving to migrify php-config-printer

* regenerate docs

* include rules oerview
2020-09-24 18:54:39 +00:00
Igor
52f02d8c91
[Naming] Make bool property respect is/has/was naming (#4215) 2020-09-22 20:22:10 +00:00
Tomas Votruba
a73fc88add
[Docs] update docs with node examples (#4269) 2020-09-22 11:27:44 +02:00
Marek Šimeček
e0cb8c228b
node docs (#4259) 2020-09-18 16:06:24 +02:00
Tomas Votruba
2243583537
[Docs] update docs and type check (#4241) 2020-09-18 11:50:55 +02:00
Marek Šimeček
3442308bba
Caching (#4237)
Co-authored-by: Marek Šimeček <marek.simecek@footshop.cz>
2020-09-16 20:11:35 +02:00
Abdul Malik Ikhsan
869441eb98
run dump-rectors for new IssetOnPropertyObjectToPropertyExistsRector rule (#4226) 2020-09-15 14:30:36 +02:00
Tomas Votruba
4711abebd1
[RemovingStatic] Add SingleStaticServiceToDynamicRector (#4212)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-13 12:36:29 +02:00
dobryy
28a55c973e
[DX] Add Rule that checks that Rule + value object have same starts (#4202)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-12 23:19:08 +02:00
dobryy
a6444fb801
[DX] Configurable rule must have configure code sample, and vice versa (#4174)
* [DX] Configurable rule must have configure code sample, and vice versa

* Add ConfiguredCodeSample

* heredocs

* code sample

* fix class

* drop AbstractConfigurableMatchTypeRector

Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-11 11:21:48 +02:00
Tomas Votruba
44f383038f
[RemovingStatic] Add LocallyCalledStaticMethodToNonStaticRector (#4181)
* update docs

* [RemovingStatic] Add LocallyCalledStaticMethodToNonStaticRector

* [rector] [RemovingStatic] Add LocallyCalledStaticMethodToNonStaticRector

* [cs] [RemovingStatic] Add LocallyCalledStaticMethodToNonStaticRector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-10 07:27:03 +00:00
Tomas Votruba
6508aedd13
[Downgrade PHP 8.0] Add union types to doc types (#4082) 2020-09-08 12:00:38 +02:00
Abdul Malik Ikhsan
8604515b74
Fixes #3448 : Fixes relative path link on dump-rectors generate class link documentation (#4115)
* Fixes #3448 : Fixes relative path link on dump-rectors generate class link documentation

Signed-off-by: Abdul Malik Ikhsan <samsonasik@gmail.com>

* ensure use ltrim to remove existing ./ prefix if any

* verify deep directory with /

* run composer docs
2020-09-03 11:45:53 +02:00
Tomas Votruba
740ccda385
[CodingStyle] Drop SimplifyBoolIdenticalTrueRector, does not bring expected value (#4113) 2020-09-02 20:12:58 +00:00
Tomas Votruba
7ac228c638
[CI] Add type-declaration set (#4089)
* [CI] Add type-declaration set

* [rector] [CI] Add type-declaration set

* [cs] [CI] Add type-declaration set

* skip nullable void

* add anonymous parent/interface support

* refactor MultiExceptionCatchRector to use Catch_ over integers

* type fixes

* fix unoin array type override

* remove unused test cases

* drop overcomplicated InlineValidationRulesToArrayDefinitionRector

* skip assign on var

* [rector] skip assign on var

* [cs] skip assign on var

* [rector] [cs] skip assign on var

* skip assign on var

* fixes

* [rector] fixes

* [cs] fixes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-01 17:56:30 +00:00
Tomas Votruba
b281fb1260
StaticCall to MethodCall (#4085)
* drop MessageAsArrayRector, as only rule in guzzle

* [Transform] Move StaticCallToMethodCallRector to Transform

* merge FacadeStaticCallToConstructorInjectionRector to StaticCallToMethodCallRector

* add ArrayArgumentToDataProvider

* [Transform] Move PropertyAssignToMethodCallRector to Transform
2020-08-31 08:48:14 +00:00