3504 Commits

Author SHA1 Message Date
dobryy
003afc1435
[Order] Move ClassLike and Class_ rules into correct namespaces (#3969)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-16 13:42:22 +02:00
dobryy
d893ee7209
[Order] Order first level class statements (#3968)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-16 12:08:37 +02:00
TomasVotruba
3d5585aa74 add changeItem() 2020-08-16 01:53:21 +02:00
TomasVotruba
5a35e0a069 add get options to ColumnTagValueNode 2020-08-16 01:43:02 +02:00
TomasVotruba
4562e9b30e fix php snippet detection 2020-08-16 01:35:22 +02:00
TomasVotruba
abbb287d0b update rector recipe 2020-08-16 01:29:16 +02:00
Tomas Votruba
664388561d
Recipe array to object (#3966)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-16 00:49:15 +02:00
Tomas Votruba
6751ff37e8
make sure recipe is loaded (#3964) 2020-08-15 11:39:08 +00:00
Tomas Votruba
a7a72e2fb3
add test case for 3rd party generator + fix it (#3963)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-15 12:39:52 +02:00
Tomas Votruba
9946e88c9a
[RectorGenerator] prevent incorrect package configuration (#3962)
* preven incorrect package configuration

* update create-recipe to rector-recipe, with prefix and better discoverability

* [rector] update create-recipe to rector-recipe, with prefix and better discoverability

* [cs] update create-recipe to rector-recipe, with prefix and better discoverability

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-15 09:14:54 +00:00
TomasVotruba
94064a3dd1 fix template paths for package 2020-08-14 17:44:42 +02:00
Tomas Votruba
33d992497a
[Doctrine] Add constructor getRepository to service (#3954) 2020-08-13 01:04:23 +02:00
Tomas Votruba
74fc11088d
move Polyfill to rules (#3951) 2020-08-12 18:30:42 +00:00
Tomas Votruba
f71b242924
[Defluent] Allow DateTime to be fluent (#3947)
* ignore prefixed conflcits

* note

* skip date-time from defluencing

* drop parameter name guard, not needed anymore

* make use of addNodesAfterNode()
2020-08-12 12:32:45 +00:00
Tomas Votruba
106fb1101a
service entity repository combo (#3945)
* service entity repo combo

* apply cs, add tests, fixes

* update doc parser

* [Generic] Add RemoveAnnotationRector

* add nullsafe nodes to docs

* drop AddEmptyLineBetweenCallsInPhpConfigRector, not that useful

* namespace and phpstan fix

* [ci] merge PHPStan compat to one job, no gain split attention

* [rector] [ci] merge PHPStan compat to one job, no gain split attention

* [cs] [ci] merge PHPStan compat to one job, no gain split attention

Co-authored-by: Marek Šimeček <marek.simecek@footshop.cz>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-12 09:44:34 +00:00
dobryy
a3be7e03ca
[DX] Rename namespaces of Rector rules to respect node, instead of domain (#3911) 2020-08-12 11:08:59 +02:00
Tomas Votruba
7a603dde2d
[TypeDeclaration] Add nested key support (#3941)
* [TypeDeclaration] Add nested key support

* [rector] [TypeDeclaration] Add nested key support

* [cs] [TypeDeclaration] Add nested key support

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-11 11:58:03 +00:00
Tomas Votruba
1c4b510513
PHPStan: require iterable types (#3936)
* phpstan: require iterable types

* add link on relative path and line

* fix missing class type

* typed array in Rector code + add data provide support resolver

* remove duplicated set

* drop unused yaml ecs config

* add out-of-the-box directory for 3rd party packages

* static fixes

* [rector] static fixes

* [cs] static fixes

* [rector] [cs] static fixes

* generic types

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-11 10:59:04 +00:00
dobryy
29d44284cc
[Order] Order class methods by visibility (#3923)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-07 18:23:40 +02:00
Tomas Votruba
ec28719c6c
make use of NodeConnectingVisitor + improve generate Rector docs (#3925) 2020-08-07 11:30:05 +02:00
Tomas Votruba
734d11f6c9
[SOLID] Skip func calls that change variable in ChangeReadOnlyVariableWithDefaultValueToConstantRector (#3916) 2020-08-07 00:25:25 +00:00
Zing
c60fad6976
Fix set path was not found (#3918) 2020-08-06 09:11:41 +02:00
dobryy
411d76f9a9
[Order] Make OrderPrivateMethodsByUseRector process file in one run u… (#3889)
* [Order] Make OrderPrivateMethodsByUseRector process file in one run using while loop

* [Order] Enable rule in CI

* [rector] [Order] Enable rule in CI

* [cs] [Order] Enable rule in CI

* [Order] Use constant for number of max attempts and throw exception when exceeded.

* [rector] [Order] Use constant for number of max attempts and throw exception when exceeded.

* [cs] [Order] Use constant for number of max attempts and throw exception when exceeded.

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-05 22:45:36 +02:00
dobryy
7baec08138
Check that Recipe node types are imported (#3904)
* Check that Recipe node types are imported

* [rector] Check that Recipe node types are imported

* [cs] Check that Recipe node types are imported

* Update packages/rector-generator/src/ValueObject/Configuration.php

Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>

* Use `is_a` instead of `class_exists` in order to also check whether node type implements \PhpParser\Node interface

Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-08-04 22:34:24 +00:00
Tomas Votruba
fa9f618866
skip configure unless in tests (#3907) 2020-08-04 19:12:46 +00:00
Tomas Votruba
7212366606
[Naming] Decouple RenameParamToMatchTypeRector (#3906)
* [Naming] Decouple RenameParamToMatchTypeRector

* remove overrlaping useless test fixtures

* [rector] remove overrlaping useless test fixtures

* [cs] remove overrlaping useless test fixtures

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-04 18:30:31 +00:00
Tomas Votruba
09f67341ee
Add set-path constant support (#3886) 2020-08-03 21:14:41 +02:00
Tomas Votruba
b61d22d56e
[Naming] Allow uuid to have name id (#3883)
* [Naming] Allow uuid to have name id

* add REPOSITORY_AS_SERVICE set

* [rector] add REPOSITORY_AS_SERVICE set

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-03 17:52:40 +00:00
Tomas Votruba
e7429d96a4
make use of constant (#3875) 2020-08-02 13:17:33 +00:00
Tomas Votruba
ee957111c4
fix import slash (#3871) 2020-08-02 10:04:46 +00:00
Tomas Votruba
fa2caf77ed
[NetteCodeQuality] Add ArrayAccessSetControlToAddComponentMethodCallRector (#3867) 2020-08-02 00:18:40 +02:00
Tomas Votruba
a84528af9e
[Docs] Show constants over values (#3866)
* [docs] decouple RectorCodeSamplePrinter

* decopule printers

* make sure constnat are used in docs

* update docs
2020-08-01 20:55:31 +00:00
Tomas Votruba
800abda3d2
[MagicDisclosure] Improve naming (#3862)
* add FluentChain keywords together, to make easier to find the classes

* decopule AbstractFluentChainMethodCallRector
2020-08-01 15:34:08 +00:00
Tomas Votruba
4624778cb0
[MagicDisclosure] Fluent refactoring (#3861)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-01 16:57:37 +02:00
Tomas Votruba
55acb3578a
[MagicDisclosure] Add SetterOnSetterMethodCallToStandaloneAssignRector (#3860)
* [MagicDisclosure] Add MethodCallOnSetterMethodCallToStandaloneAssignRector

* merge ChainMethodCallManipulator to ChainMethodCallNodeAnalyzer for better DX

* [MagicDisclosure] Add in arg defluent

* rebase
2020-08-01 11:41:16 +00:00
Zing
578bfaf38c
[RectorGenerator] Fix trailing comma in function calls error in php 7.2 (#3857) 2020-08-01 09:05:05 +02:00
Tomas Votruba
76b4ab7586
[Defluent] New set + various improvements (#3853)
* remove dead-else branch

* add defluent set

* fix type to match

* use constants over strings

* fixup! use constants over strings

* Add fluent as arg support to DefluentMethodCallRector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-07-31 23:08:16 +00:00
TomasVotruba
c463b08d53 fix inner type override 2020-07-31 23:41:41 +02:00
dobryy
3aa2fc8727
[Order] Order properties and constants with respect of complexity and position (#3826)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-07-31 22:20:45 +02:00
kodiakhq[bot]
e27f70d103
Merge pull request #3831 from rectorphp/fix-call
decouple testing tools
2020-07-30 16:42:09 +00:00
TomasVotruba
0647a0e922 update docs to use call() 2020-07-30 17:42:01 +02:00
TomasVotruba
2291d5540a decopule testing tools 2020-07-30 16:31:57 +02:00
TomasVotruba
2ad011673f [PHP 7.0] Fix variable name on static call 2020-07-30 15:53:21 +02:00
TomasVotruba
2bdb38b602 add suffix to prevent phpunit autoload 2020-07-30 15:27:39 +02:00
TomasVotruba
fe72e003ed use constants in configs 2020-07-30 13:53:53 +02:00
TomasVotruba
135c6cd110 make fixture naming unique 2020-07-29 21:52:18 +02:00
TomasVotruba
2741893bbf [RectorGenerator] Refactoring to testable code 2020-07-29 20:50:31 +02:00
TomasVotruba
5859625d5d [Nette] Add TranslateClassMethodToVariadicsRector 2020-07-29 03:21:08 +02:00
TomasVotruba
94088334c7 fix missing test fixture in generator 2020-07-29 02:29:44 +02:00
TomasVotruba
de5026fdb1 remove left-over of Generic rules 2020-07-29 02:28:32 +02:00