Commit Graph

544 Commits

Author SHA1 Message Date
Tomas Votruba
cae21ff247 Updated Rector to commit acabcfc456
acabcfc456 [TypeDeclaration] Do not add return type on parent Closure for deep closure has return type on ReturnTypeFromStrictTypedCallRector (#439)
2021-07-15 22:20:38 +00:00
Tomas Votruba
31b96d8276 Updated Rector to commit 5f43d6b712
5f43d6b712 Make RemoveUnusedPrivateClassConstantRector use of static reflection (#384)
2021-07-05 09:49:56 +00:00
Tomas Votruba
1f8149a055 Updated Rector to commit a9b1bbba88
a9b1bbba88 [PHP 8.0] Make Downgrade widening union depend on ClassMethod, the narrow scope (#375)
2021-07-04 18:27:51 +00:00
Tomas Votruba
ba438584ff Updated Rector to commit 4f4dce928e
4f4dce928e Improve reflection for Variadic analyzer (#310)
2021-06-27 14:06:45 +00:00
Tomas Votruba
7d23c365ed Updated Rector to commit 6554750698
6554750698 [automated] Apply Coding Standard (#308)
2021-06-27 12:13:59 +00:00
Tomas Votruba
5a0a45ded6 Updated Rector to commit 20ad16b1e6
20ad16b1e6 [automated] Re-Generate Nodes/Rectors Documentation (#307)
2021-06-27 12:12:15 +00:00
Tomas Votruba
89bf6477a6 Updated Rector to commit ff4a9883f9
ff4a9883f9 [automated] Re-Generate Nodes/Rectors Documentation (#252)
2021-06-21 19:24:28 +00:00
Tomas Votruba
ab3b6b2c9e Updated Rector to commit 651562dca2
651562dca2 [automated] Re-Generate Nodes/Rectors Documentation (#211)
2021-06-13 10:00:46 +00:00
Tomas Votruba
4e4ad99d9a Updated Rector to commit 1a3afef04d
1a3afef04d PHPStan updated and static fixes (#192)
2021-06-10 10:46:24 +00:00
Tomas Votruba
d29020633e Updated Rector to commit 3158767ccb
3158767ccb [automated] Re-Generate Nodes/Rectors Documentation (#157)
2021-06-06 07:59:41 +00:00
Tomas Votruba
d6ce660185 Updated Rector to commit 0864547a0d
0864547a0d [automated] Re-Generate Nodes/Rectors Documentation (#125)
2021-05-30 07:54:06 +00:00
Tomas Votruba
8ef1dfb7af Updated Rector to commit ed8191fb64
ed8191fb64 [Docs] Fixes rector_rules_overview.md docs link in each rules (#92)
2021-05-23 09:33:26 +00:00
Tomas Votruba
10b65060a2 Updated Rector to commit cefe13feab
cefe13feab fix rector rules overview dump location (#49)
2021-05-16 08:19:51 +00:00
github-actions[bot]
dd41106ee4
[automated] Re-Generate Nodes/Rectors Documentation (#6396)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-05-09 02:15:50 +02:00
Tomas Votruba
5fe3eb555f
[PHP 5.3] Add DirConstToFileConstRector (#6363) 2021-05-05 21:56:59 +00:00
github-actions[bot]
ea0061264a
[automated] Re-Generate Nodes/Rectors Documentation (#6281)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-05-02 10:26:23 +02:00
Tomas Votruba
ca4d1fb1aa
[TypeDeclaration] Traverse the param node that is changed in ParamTypeFromStrictTypedPropertyRector (#6260) 2021-04-28 20:33:20 +00:00
github-actions[bot]
08aab90348
[automated] Re-Generate Nodes/Rectors Documentation (#6236)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-04-25 11:44:34 +02:00
Tomas Votruba
a3ec81fe1f
Add setter/getter factory (#6219) 2021-04-23 18:14:51 +00:00
Tomas Votruba
ff57c49662
[PHP 7.2] Add covariant param support for trait methods (#6190)
* [Downgrade PHP 7.2] Handle trait methods too

* move DowngradeParameterTypeWideningRector to Class_ namespace

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-22 00:02:38 +02:00
github-actions[bot]
2b88d9d937
[automated] Re-Generate Nodes/Rectors Documentation (#6163)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-04-18 15:01:56 +02:00
Tomas Votruba
268b32ff7e
[DeadCode] Remove duplicated RemoveUnusedPrivateConstantRector (#6151)
* [DeadCode] Remove duplicated RemoveUnusedPrivateConstantRector

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-15 23:38:44 +02:00
Rob Landers
27f3544e8e
Fix nullsafe transpile (#6101)
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2021-04-15 19:16:27 +00:00
Tomas Votruba
8b402bfe02
Make use of File object instead of passing around provider of file info, tokens, stmts etc. (#6110)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-13 00:12:48 +00:00
Tomas Votruba
26a5b86892
[Privatization] Remove MakeUnusedClassesWithChildrenAbstractRector as risky and full context is needed (#6091) 2021-04-10 20:18:49 +02:00
Zing
ff9173ff35
Stripping quotation marks of argument default value (#5997) 2021-03-26 13:45:54 +07:00
Tomas Votruba
27e9ad030a
Remove buggy rules that depend on false condition of all class and calls analysis, to improve static reflection (#5958)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-23 23:13:35 +01:00
Tomas Votruba
89a7afb5a4
Merge DeadDocBlock to DeadCode (#5936) 2021-03-21 12:57:56 +00:00
Dominik Peters
dc94477d54
Migrate at to with consecutive and will return on consecutive calls (#5822) 2021-03-18 00:11:23 +01:00
Tomas Votruba
0ac0e54b02
[Naming] Removing underscore rules, rather handle with coding standards (#5868) 2021-03-15 23:24:43 +00:00
Tomas Votruba
683f8319a8
[CI] simplify php linter (#5867)
* [CI] simplify php linter

* [CI] merge code analysis to one

* [docs] remove nodes overview, already in external repository

* remove unused ci job

* [CI] check annotation parser + sync

* [DeadCode] Remove RemoveEmptyAbstractClassRector, not reliable with static-reflection, opionated

* [CI] remove set validation, PHPStan handles this better with PHP

* remove dead-code-strict [skip ci]
2021-03-15 23:44:28 +01:00
Tomas Votruba
d897902ccf
[Downgrade] Keep better phpdoc type (#5862) 2021-03-15 18:58:04 +01:00
github-actions[bot]
bd1a0f1be7
[automated] Re-Generate Nodes/Rectors Documentation (#5840)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-03-14 01:55:25 +01:00
Tomas Votruba
721f619a1d
Post moving cleanup (#5827) 2021-03-12 23:52:38 +00:00
Tomas Votruba
157c39aefc
[DX] move src/tests rules from micro-packages to single PSR-4 structure (#5826) 2021-03-12 23:20:25 +01:00
Tomas Votruba
67670e70ad
[DX] move packages from src/tests to single PSR-4 directory (#5824) 2021-03-12 01:21:29 +00:00
github-actions[bot]
65e43f3dfa
[automated] Re-Generate Nodes/Rectors Documentation (#5788)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-03-07 12:24:31 +01:00
Tomas Votruba
382f146eaf
Merge CoreRectorInterface (#5762) 2021-03-03 22:28:27 +01:00
Tomas Votruba
d5bf66f9cd
[CI] run rules dir by dir to identify static reflection weak sposts (#5720)
* [CI] run rules dir by dir to identify static reflection weak sposts

* [ci-review] Rector Rectify

* consistency

* remove unused property

* add data provider test fixture

* add InvertedIfFactory to lower complexity

* [DeadCode] Skip unused public method if data provider

* misc

* [DeadCode] Do not remove class method if required by parent ocntract

* make use of ContextAnalyzer to find the loop

* narrow dirs one level

* narrow packages

* narrow

* use directly

* narrow

* correct constant name to keep BC

* bump deps

* add version_compare to removed extra params, just to be sure

* do not return function node on unchanged name

* narrow

* add support for multiple variants

* widen

* remove double check [skip ci]

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-02 14:43:36 +01:00
Tomas Votruba
05788745fd
[Downgrade] Remove excessive abstract class inheritance, use single service (#5717) 2021-03-01 12:10:50 +00:00
github-actions[bot]
510252cdc5
[automated] Re-Generate Nodes/Rectors Documentation (#5698)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-02-28 08:52:22 +01:00
Tomas Votruba
e571128b85
[Transform] Move FunctionCallToConstantRector to FuncCallToConstFetchRector (#5642) 2021-02-21 09:40:54 +00:00
github-actions[bot]
eb4bc68409
[automated] Re-Generate Nodes/Rectors Documentation (#5641)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-02-21 01:06:30 +01:00
Tomas Votruba
9a376d98e5
[Arguments] New rule set from former generics (#5637)
* [Transform] Move SingleToManyMethodRector

* [Transform] Move WrapReturnRector here

* [DependencyInjectoin] Move AddMethodParentCallRecto here

* [Arguments] Create new package from old generics only around arguments

* composer docs uild
2021-02-21 00:21:19 +01:00
Tomas Votruba
947a75f6aa
rebuild docs (#5636) 2021-02-21 00:02:05 +01:00
Tomas Votruba
13e33f0bff
[Generic] Decouple rules to tailored sets (#5635)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-20 23:48:31 +01:00
Tomas Votruba
19810c2b9a
move FunctionToStaticMethodRector to Transform (#5613) 2021-02-18 21:35:10 +00:00
Tomas Votruba
de8fa30257
[cs] apply indent of call in configs (#5547) 2021-02-14 21:28:21 +00:00
github-actions[bot]
981e437bb7
[automated] Re-Generate Nodes/Rectors Documentation (#5539)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-02-14 10:46:15 +01:00
Tomas Votruba
5c56de463e
bump docs (#5530) 2021-02-13 15:57:30 +01:00
Tomas Votruba
ecbef2bcaa
[Tests] remove getPhpVersion() helped method, use configs instead (#5477) 2021-02-09 17:25:16 +00:00
Tomas Votruba
e0ad0f960f
[Tests] Move from getRectorsWithConfiguration() to provideConfigFileInfo() to make test configs more intuitive (#5468)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-09 15:02:29 +01:00
github-actions[bot]
8ef96f2166
[automated] Re-Generate Nodes/Rectors Documentation (#5443)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-02-07 11:11:42 +01:00
Tomas Votruba
0c830ab123
misc (#5439) 2021-02-06 22:20:57 +00:00
Tomas Votruba
d402f52238
[TypeDeclaratoin] Add ReturnTypeFromStrictTypedPropertyRector (#5438) 2021-02-06 23:09:45 +01:00
github-actions[bot]
537755a44a
[automated] Re-Generate Nodes/Rectors Documentation (#5387)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-31 09:12:01 +01:00
Tomas Votruba
b6b8ac0c4c
Less traits 3, drop duplicated issue tests (#5385) 2021-01-31 00:14:13 +00:00
Tomas Votruba
e2757242be
Various stabilizations (#5381) 2021-01-30 20:30:37 +00:00
Tomas Votruba
737b6471c2
[Performance] [Polyfill] Move to DeadCode (#5380) 2021-01-30 19:56:32 +00:00
Tomas Votruba
2df4732c6c
Move Architecture to Doctrine, improve a bit (#5374) 2021-01-30 08:57:35 +00:00
Tomas Votruba
024ec4ba93
[Generics] Add GenericsPHPStormMethodAnnotationRector (#5365)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-29 17:24:20 +01:00
Tomas Votruba
f1a70bd271
[Removing] Move RemoveInterfacesRector here (#5361) 2021-01-29 10:38:59 +00:00
Tomas Votruba
53102c9c29
[Removing] Init new set (#5360)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-29 08:08:55 +00:00
Tomas Votruba
1f61ef7160
[Generic] specialize generic rules (#5355) 2021-01-29 00:29:12 +00:00
Tomas Votruba
34c0f08969
[Generic] Split rules to their particular categories (#5354)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-29 00:32:20 +01:00
Tomas Votruba
8e3e3fd6e1
add CoreRectorInterface and PhpCoreRectorInterface to allow PhpRectorInterface to be RectorInterface without getDefinition() (#5348) 2021-01-28 19:26:56 +01:00
Tomas Votruba
fced0ca087
[Symfony] Add Symfony 5.1 set (#5331)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-27 15:09:08 +01:00
Tomas Votruba
e00106ee49
[phpstan] Make ComposerRectorInterface child classes respetc the "ComposerRector" suffix (#5319) 2021-01-26 01:32:23 +00:00
Tomas Votruba
8d600ce412
[docs] regenerate (#5316) 2021-01-25 18:59:06 +00:00
github-actions[bot]
ad256edcad
[automated] Re-Generate Nodes/Rectors Documentation (#5296)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-24 10:07:23 +01:00
vladyslavstartsev
10b96a0b97
Make example of ReplaceStringWithClassConstantRector more correct (#5269)
* Make example of ReplaceStringWithClassConstantRector more correct

- `argument position` and `class with constants` are swapped
- `argument position` starts with zero (0), so `1` is the second argument

* also fix example in `Rector`ing class
2021-01-23 14:51:23 +02:00
Tomas Votruba
ea1f7bd758
Lower class complexity (#5208)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-17 15:43:47 +00:00
github-actions[bot]
d93900b56a
[automated] Re-Generate Nodes/Rectors Documentation (#5211)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-17 14:32:41 +01:00
Tomas Votruba
024a97d019
[RemovingStatic] Decouple static (#5207)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-16 22:45:18 +01:00
Tomas Votruba
04db98620a
Refactor composer modifier to ComposerRector (#5198) 2021-01-16 13:23:37 +01:00
github-actions[bot]
fc9acd9c21
[automated] Re-Generate Nodes/Rectors Documentation (#5178)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-14 11:10:33 +01:00
github-actions[bot]
19c47b9f1f
[automated] Re-Generate Nodes/Rectors Documentation (#5162)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-13 02:25:45 +01:00
github-actions[bot]
f40d602d43
[automated] Re-Generate Nodes/Rectors Documentation (#5150)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-12 12:52:10 +01:00
github-actions[bot]
f1d4a4a671
[automated] Re-Generate Nodes/Rectors Documentation (#5118)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-09 12:16:22 +01:00
Tomas Votruba
27f2fad0c0
[DeadCode] Fix removing native interface (#5113)
* [Restoratoin] Skip native interface from removing

* move RemoveUselessJustForSakeInterfaceRector to dead code category

* remove interface name pattern

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-08 14:34:54 +00:00
Floris Luiten
39a6b79f30
Fixed typo "lenght" (#5096)
* Fixed typo in docs "lenght" to "length"

* Fixed typo in class constant "lenght" to "length"

* Changed "lenght" instead of "length", fixing bug in class_exists using incorrect classname
2021-01-06 03:06:16 +07:00
github-actions[bot]
17f47bd5c4
[automated] Re-Generate Nodes/Rectors Documentation (#5082)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-04 14:09:38 +01:00
github-actions[bot]
34c3c3a67c
[automated] Re-Generate Nodes/Rectors Documentation (#5061)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-01 19:59:23 +01:00
Tomas Votruba
a4f8a23ecf
[CodeQuality] Move MoveVariableDeclarationNearReferenceRector (#4992) 2020-12-25 17:48:15 +01:00
Tomas Votruba
db89b5eefa
[CodeQuality] Move MoveVariableDeclarationNearReferenceRector (#4989)
* [CodeQuality] Move MoveVariableDeclarationNearReferenceRector

* move code-quality-strict rules to own namespace

* move MoveVariableDeclarationNearReferenceRector to CodeQualityStrict

* add ClassConstFetchFactory

* static fixes
2020-12-25 16:22:19 +00:00
Tomas Votruba
a2dbaedb0e
[Privatization] Move MakeUnusedClassesWithChildrenAbstractRector here (#4987) 2020-12-25 15:45:17 +01:00
Tomas Votruba
bfcdd22a7c
[Privatization] Move FinalizeClassesWithoutChildrenRector here (#4986) 2020-12-25 14:59:14 +01:00
Tomas Votruba
cffd7ea0ac
[CodingStyle] Move PHPStormVarAnnotationRector (#4985)
* [CodingStyle] Move PHPStormVarAnnotationRector

* [ci-review] Rector Rectify

* [DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here (#4984)

* [DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>

* [ci-review] Rector Rectify

* cleanup docs

* static fixes

* [ci-review] Rector Rectify

* remove duplicated

* multi use case

* misc

* [ci-review] Rector Rectify

* fixes

* remove order set, slow

* move UseMessageVariableForSprintfInSymfonyStyleRector from solid set to coding-style

* make unique-named variables to prevent accidental override and improve readability

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 13:20:13 +00:00
Tomas Votruba
61b72a8d7c
[DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here (#4984)
* [DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 00:56:59 +00:00
Tomas Votruba
d465ec83e2
[DeadCode] Move RecastingRemovalRector from PHPStan set (#4983)
* [DeadCode] Move RecastingRemovalRector from PHPStan set

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 00:22:45 +00:00
Tomas Votruba
c5d258e0cc
[Downgrade] Drop ChangePhpVersionInPlatformCheckRector as not useful, paltform check false is good enough (#4939)
* [Downgrade] Drop ChangePhpVersionInPlatformCheckRector as not useful, paltform check false is good enough

* fixup! [Downgrade] Drop ChangePhpVersionInPlatformCheckRector as not useful, paltform check false is good enough
2020-12-22 15:48:25 +00:00
Tomas Votruba
eddb2b29c9
[EarlyReturn] Decouple new rules (#4868) 2020-12-12 16:59:09 +00:00
github-actions[bot]
fb87c23e07
[automated] Re-Generate Nodes/Rectors Documentation (#4803)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-12-06 11:19:50 +01:00
Tomas Votruba
dc61d2fecf
add docblock on downgrade by default (#4799)
* add docblock on downgrade by default

* update docs

* drop no docblock test
2020-12-05 22:33:27 +00:00
github-actions[bot]
34881de2f5
[automated] Re-Generate Nodes/Rectors Documentation (#4783)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-12-05 11:08:31 +01:00
Tomas Votruba
520b8a9a85
[DeadDocBlock] decouple return and param rules (#4782)
* decopule return and parma rules

* enable in CI

* cleanup

* protected class-string vs string
2020-12-05 00:31:05 +00:00
github-actions[bot]
9a52045475
[automated] Re-Generate Nodes/Rectors Documentation (#4767)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-12-04 01:51:32 +01:00
github-actions[bot]
1dc13433a5
[automated] Re-Generate Nodes/Rectors Documentation (#4759)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-12-03 09:32:04 +01:00
github-actions[bot]
481aa0d700
[automated] Re-Generate Nodes/Rectors Documentation (#4745)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-12-02 09:52:34 +01:00
github-actions[bot]
bb69160bd8
[automated] Re-Generate Nodes/Rectors Documentation (#4739)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-12-01 14:40:16 +01:00
github-actions[bot]
d82ddcc4ba
[automated] Re-Generate Nodes/Rectors Documentation (#4722)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-28 19:06:05 +01:00
Tomas Votruba
51ab276d57
[Downgrade PHP 7.1] feature/downgrade iterable pseudo type (#4706)
* [Downgrade PHP 7.1] iterable pseudo-type

* fix PHP version type

* cleanup

* static fixes

Co-authored-by: Norbert Orzechowicz <norbert@orzechowicz.pl>
2020-11-27 12:00:56 +00:00
Tomas Votruba
0993088cda
[SymfonyPhpConfig] Use Symplify package instead + simplify set validation (#4694)
* [SymfonyPhpConfig] Use Symplify package instead

* [SymfonyPhpConfig] Drop forgotten custom-jobs Rectors

* [CI] simplify set validation

* from inline functions to Static class

* cleanup

* decouple rector.php to allow static analysis and coding standards
2020-11-26 16:44:27 +00:00
Tomas Votruba
0456cc088c
[Docs] Improve rule doc generator to generat rules_overview with categories (#4688)
* numbers

* update ECS config to Symplify 9

* regenerate rules with categorize

* [CI] disable automated rebase, as not working propperly

* update misc
2020-11-25 21:34:34 +00:00
github-actions[bot]
46388345b1
[automated] Re-Generate Nodes/Rectors Documentation (#4685)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-25 01:42:23 +01:00
HDVinnie
3fc5163f01
update: drop migrify/php-config-printer for symplify/php-config-printer (#4684)
* update: composer.json

- Package migrify/php-config-printer is abandoned. Using symplify/php-config-printer instead.

* update: migrify to symplify

* update: composer.json

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

Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-11-24 16:14:21 +00:00
github-actions[bot]
64ab0a65b4
[automated] Re-Generate Nodes/Rectors Documentation (#4682)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-24 01:49:19 +01:00
Tomas Votruba
26b71cce1d
[Laravel] Improve static to DI set (#4662) 2020-11-20 01:26:04 +01:00
github-actions[bot]
13d2f98643
[automated] Re-Generate Nodes/Rectors Documentation (#4656)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-19 02:09:53 +01:00
github-actions[bot]
943eb55d65
[automated] Re-Generate Nodes/Rectors Documentation (#4638)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-18 02:11:35 +01:00
Norbert Orzechowicz
05688bd36b
[Downgrade PHP 7.1] Class constant visibility (#4633) 2020-11-17 11:45:31 +01:00
Tomas Votruba
a7705ed0a5
[Symplify 9] First update + switch to RuleDocGenerator (#4616)
* [composer] bump to Symplify 9

* [Symplify 9] Update phpstan rules

* bump to Symplify 9 BETA2

* update AbstractKernel from Tests to Testing namespace

* decoupling removing node trait

* remove fluent calls

* removing variadic

* [CodingStyle] Improve AnnotateThrowablesRector

* bump deps

* Make use of RuleDocGenerator

* first short

* [DocumentationGenerator] Drop deprecated package, RuleSetGenerator now handles it

* import namespace

* update docs
2020-11-16 17:50:38 +00:00
github-actions[bot]
e704af3dd7
[automated] Re-Generate Nodes/Rectors Documentation (#4618)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-16 01:40:38 +01:00
github-actions[bot]
514cf0d88b
[automated] Re-Generate Nodes/Rectors Documentation (#4604)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-14 02:27:55 +01:00
github-actions[bot]
26efdc6622
[automated] Re-Generate Nodes/Rectors Documentation (#4594)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-13 01:38:40 +01:00
Abdul Malik Ikhsan
3d2c7c30bd
[CodingStyle] Failing test case for cannot change this to self (#4590)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 21:50:36 +01:00
Tomas Votruba
7e3f8bdafc
[Laravel] Add AddMockConsoleOutputFalseToConsoleTestsRector (#4589)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 21:47:25 +01:00
Tomas Votruba
aa91f11a3f
[Laravel 5.7] Add ChangeQueryWhereDateValueWithCarbonRector (#4586)
* [Laravel] Add ChangeQueryWhereDateValueWithCarbonRector

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 15:28:50 +00:00
Tomas Votruba
4c6da2c4bf
[Laravel 5.7] Add parent boot rule (#4580)
* move file to templates, to remove confusion in the root

* use stable symplify

* [Laravel] Add AddParentBootToModelClassMethodRector

* [ci-review] Generate Rector & Nodes documentation

* [ci-review] propagate monorepo dependencies

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-11 17:09:57 +00:00
Abdul Malik Ikhsan
ef442dca03
[PHP 8.0] Improve NullsafeOperatorRector : No need ?-> on very first call (#4571)
* [PHP 8.0] Improve NullsafeOperatorRector : No need ?-> on very first call

* use bool check is start if

* phpstan

* phpstan and code example update

* [ci-review] Generate Rector & Nodes documentation

* [ci-review] Apply coding standards

* using $isStartIf = true default

* clean up

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-10 10:09:39 +00:00
Abdul Malik Ikhsan
660f51019a
[PHP 8.0] Fixes #4527 Add NullsafeOperatorRector (#4557)
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-11-08 23:15:16 +01:00
Abdul Malik Ikhsan
4764fd1ac3
[DeadCode] Fixes #4561 Skip RemoveUnusedPrivatePropertyRector removes used Parameter (#4564)
* Add test case for not removing used constructor parameter

* Fixes #4561 Closes #4563

* [ci-review] Generate Rector & Nodes documentation

* [ci-review] Apply coding standards

* phpstan

* reduce complexity

* [ci-review] Rector Rectify

Co-authored-by: Tim Siebels <siebels.tim@gmail.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-08 18:22:24 +00:00
Krystian Marcisz
a92f4c1e2d
[DoctrineCodeQuality] Remove redundant default values from annotations (#4542)
* Move duplicated getAttributableItems() method to abstract parent

* Add removeItem() method to AbstractTagValueNode class

* Add RemoveRedundantDefaultAnnotationValuesRector rule with tests

* Link second test case of RemoveRedundantDefaultAnnotationValuesRector

* Add to set and docs

* Rename variable in DoctrineClassAnalyzer::matchDoctrineEntityTagValueNode()

* Remove redundant docblocks in RemoveRedundantDefaultAnnotationValuesRector

* Extract hasItemWithDefaultValue method in RemoveRedundantDefaultAnnotationValuesRector

* Optimize RemoveRedundantDefaultAnnotationValuesRector

* Split rule into two separate: one for Property and one for Class_

* PHP CS Fixer

* PHPStan
2020-11-04 22:51:11 +01:00
Abdul Malik Ikhsan
01092de6bb
[Nette 3.0] Fixes #4387 : Add ConvertAddUploadWithThirdArgumentTrueToAddMultiUploadRector (#4551)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-04 05:45:10 +01:00
Tomas Votruba
297ec316af
move suffix filesystem 3 (#4540) 2020-11-01 21:31:13 +01:00
Tomas Votruba
c03b66f7cd
move suffix filesystem 2 (#4529)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-01 16:39:04 +01:00
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
Tomas Votruba
082f1c6294
[Transform] Move StaticCallToMethodCallRector to Transform (#4084)
* drop MessageAsArrayRector, as only rule in guzzle

* [Transform] Move StaticCallToMethodCallRector to Transform
2020-08-31 00:26:25 +00:00
Tomas Votruba
3a7d197b34
update FuncNameToStaticCallName to FuncCallToStaticCall (#4080) 2020-08-30 20:12:49 +00:00
dobryy
4e91b78c7b
[Naming] Rename the rule to make it correspond with what rule does (#4076)
* [Naming] Rename the rule to make it correspond with what rule does

* [Naming] Update doc
2020-08-30 21:01:33 +02:00
Tomas Votruba
3d03ec4beb
Removing single-rule elastic package set, merge Decomplex set to CodingStyle, merge FrameworkMigration to NetteToSymfony (#4079)
* drop elasticsearch-dsl50, used for single change, unmaintained

* [CodingStyleAdvanced] Move UseMessageVariableForSprintfInSymfonyStyleRector from single-rule set Decomplex to CodingStyleAdvanced

* merge FrameworkMigration with 1 class to NetteToSymfony

* [Transform] Move ServiceGetterToConstructorInjectionRector to Transform set

* [Transform] Move ReplaceParentCallByPropertyCallRector to Transform package

* [Transform] Move StaticCallToFunctionRector to Transform

* update docs

* [Transform] Move NewToStaticCallRector to Transform
2020-08-30 18:48:37 +00:00
Tomas Votruba
4584359f96
[Transform] Move FuncCallToMethodCallRector to Transform category (#4077) 2020-08-30 19:59:59 +02:00
Tomas Votruba
989c3f4168
[Transform] Move HelperFunctionToConstructorInjectionRector to Transform package (#4074)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 18:55:16 +02:00
Tomas Votruba
e698e83687
[Transform] Decouple new set that changes nodes (#4073)
* [Transform] Move PropertyToMethodRector from Generic to Transform category

* move AbstractIsAbleRector to Generic

* [Transform] Move MethodCallToPropertyFetchRector from Generic to Transform

* [Transform] Move MethodCallToStaticCallRector from Generic to Transform

* [Transform] Move MethodCallToAnotherMethodCallWithArgumentsRector from Generic to Transform
2020-08-30 15:47:36 +02:00
Tomas Votruba
ff6d6571e6
[Order] Add abstract class, check for changed order and move category to Class_, to prevent minus types (#4069)
* [Order] report applied rule only on change

* add AbstractConstantPropertyMethodOrderRector, use explicit Class_ and Trait_ over minus

* update docs

* add PropertyNameRankAndPosition value object

* static fixes

* add ClassMethodRankeable and RankeableInterface, to get rid of arrays

* add PropertyRankeable

* add ClassConstRankeable

* add sortByRanksAndGetNames()

* [rector] add sortByRanksAndGetNames()

* [cs] add sortByRanksAndGetNames()

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 12:45:03 +00:00
Tom Pavelec
36b24b2bfc
fix: swapped naming of camel and pascal cases (#4047) 2020-08-28 18:07:15 +02:00
Tomas Votruba
650dcc8ef0
beware reference (#4039) 2020-08-27 12:19:22 +02:00
Tomas Votruba
dbda0beee8
[DX] Last value objects (#4035)
* [DX] Add CallToFluent

* [DX] Add ArrayToFluentCall

* [DX] Add FactoryMethod
2020-08-26 14:25:28 +00:00
Tomas Votruba
dfe158e2da
[DX] Various value objects added (#4034)
* [DX] Add TypeToStaticCall

* [DX] Add ClassConstantRename

* [DX] Add IssetUnsetToMethodCall

* [DX] Add MethodToYield

* drop unamtained shopware sets

* [DX] Add RenamedAnnotationInType

* [DX] Add MethodCallWrap

* [DX] Add RenamedProperty

* [DX] Add StringToClassConstant

* [DX] Add ArgumentSwap

* simplify rename function rector

* [DX] Add RemovedFunctionArgument

* [DX] Add MethodCallToService

* [DX] Add UnprefixedMethodToGetSet

* [DX] Add PseudoNamespaceToNamespaceRector

* [DX] Add FunctionArgumentSwap

* [DX] Add StaticCallToFunction

* [DX] Add ParentCallToProperty

* [DX] Add ParentDependency

* [DX] Add CallWithParamRename

* [DX] Added MethodCallRenameWithAddedArguments

* [DX] Add PropertyToMethodCall

* [DX] Add PropertyToMethodCall

* [rector] [DX] Add PropertyToMethodCall

* [cs] [DX] Add PropertyToMethodCall

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-26 10:54:53 +00:00
Tomas Votruba
b4db31a2ae
[DX] Add ReplacedArgument (#4030) 2020-08-26 00:21:41 +02:00
Tomas Votruba
5cad696c95
[DX] Add AddedArgument (#4029) 2020-08-25 23:25:00 +02:00
Tomas Votruba
c2cfdaeacd
[DX] Add MethodVisibility value object (#4028) 2020-08-25 21:19:12 +02:00
Tomas Votruba
4553ae9579
[DX] Add TypeMethodWrap, RemovedArgument (#4026)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-25 21:05:58 +02:00
Tomas Votruba
44d3ec8b7a
[DX] Add MethodReturnType value object (#4020)
* re-enable rule

* add MethodReturnType value object

* drop sylius deprecated sets, as not maintained for last 2 years
2020-08-25 18:34:49 +00:00
Tomas Votruba
35f61c64b6
[objectize] moving parameter typehint to objects (#4019)
* moving parameter typehint to objects

* rename constnats

* add support for nested configs

* switch to param type value object

* [rector] switch to param type value object

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-25 02:21:00 +02:00
Tomas Votruba
872f13b27d
rename to value object constants (#4018) 2020-08-24 22:37:12 +00:00
Tomas Votruba
c1653070f5
[phpstan] Add rule for complex config (#4015)
* [phpstan] Add ForbiddenComplexArrayConfigInSetRule

* add MethodCallRename value object

* [SymfonyPhpConfig] Add array to value object configuration rule

* apply first MethodCallRename value object
2020-08-24 22:26:14 +00:00
Tomas Votruba
de4748f935
README + recipe improvements (#4017)
* rector-recipe and README improvements

* ci: add generate command test
2020-08-24 21:25:26 +00:00
Tomas Votruba
9a88e032a2
[docs] print object configuration (#4010)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-23 12:39:59 +02:00
Tomas Votruba
41b679cb2a
[DX] Replacing arrays with objects (#4008)
* [phpstan] Add forbidden array destruct to prevent array mess

* use ArrayCallable value object

* add OpeningAndClosingSpace

* drop ConstructorInjectionToActionInjectionRector, antipattern

* use value objects

* [rector] use value objects

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-23 09:39:09 +00:00
Tomas Votruba
766853315e
[Naming] Add MakeIsserClassMethodNameStartWithIsRector (#4005) 2020-08-22 19:04:25 +02:00
Tomas Votruba
9164d46a3b
[Naming] Add MakeGetterClassMethodNameStartWithGetRector (#4003)
* [Naming] Add MakeGetterClassMethodNameStartWithGetRector

* [rector] [Naming] Add MakeGetterClassMethodNameStartWithGetRector

* [cs] [Naming] Add MakeGetterClassMethodNameStartWithGetRector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-22 15:46:09 +00:00
Tomas Votruba
6a442eddd9
merge CorrectDatetimeEntityPropertyDefaultToConstructorRector to MoveCurrentDateTimeDefaultInEntityToConstructorRector (#3978)
* merge CorrectDatetimeEntityPropertyDefaultToConstructorRector to MoveCurrentDateTimeDefaultInEntityToConstructorRector

* [rector] merge CorrectDatetimeEntityPropertyDefaultToConstructorRector to MoveCurrentDateTimeDefaultInEntityToConstructorRector

* add Throw Expr to docs

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-21 09:47:44 +00:00
dobryy
afa7456a05
[DX] Architecture rules respect namespace (#3983) 2020-08-20 13:56:36 +02:00
dobryy
2e7bdca4e2
[DX] Rename namespaces respect node type (#3973) 2020-08-18 17:57:30 +02:00
Tomas Votruba
1b059ee0c3
[DoctrineCodeQuality] Add ChangeBigIntEntityPropertyToIntTypeRector (#3977) 2020-08-17 13:21:59 +02:00
Tomas Votruba
c3eb9f6ada
[DoctrineCodeQuality] Add few entity rules (#3972)
* [DoctrineCodeQuality] Add few entity rules

* [rector] [DoctrineCodeQuality] Add few entity rules

* [cs] [DoctrineCodeQuality] Add few entity rules

* [rector] [cs] [DoctrineCodeQuality] Add few entity rules

* [cs] [cs] [DoctrineCodeQuality] Add few entity rules

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-16 12:39:59 +00:00
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
Michał Włodarczyk
e91aed6cdc
Fix sample configuration generation (#3957) 2020-08-15 11:25:01 +02:00
Tomas Votruba
33d992497a
[Doctrine] Add constructor getRepository to service (#3954) 2020-08-13 01:04:23 +02: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
dobryy
e4af8cc721
[Order] Order constants by visibility (#3934)
* [Order] Order constants by visibility

* phpstan iterable types fixes

* Fix PHPStan issue (unrelated to PR)

* Doc Update
2020-08-10 21:59:40 +00:00
Tomas Votruba
172653b606
drop EnsureDataProviderInDocBlockRector, job for coding standards (#3938) 2020-08-10 10:40:22 +02:00
dobryy
05ece4e8d1
[Order] Order properties by visibility (#3929) 2020-08-08 00:21:17 +02:00
Tomas Votruba
42caae413d
drop SimpleArrayCallableToStringRector, as it makes code magical and harder to proces (#3920) 2020-08-06 09:48:34 +00:00
Tomas Votruba
4c05dcd9d0
Rename StaticCallToAnotherServiceConstructorInjectionRector to StaticCallToMethodCall (#3909) 2020-08-05 00:56:59 +02: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
b2054a32fc
Provide existing expression to get type (#3899)
* add support to provide existing expression instead of addgin a property with type

* [rector] add support to provide existing expression instead of addgin a property with type

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-04 13:12:43 +00:00
Tomas Votruba
3ddf965146
FunctionTo* correction renames, add PHPStan rule to check correct category of rule (#3896)
* rename Function* to Func* rector rule

* [Utils] Add RequireRectorCategoryByGetNodeTypesRule

* [PHPUnit] Rename SpecificMethod to MethodCall category to respect subscriberd nodes

* [rector] [PHPUnit] Rename SpecificMethod to MethodCall category to respect subscriberd nodes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-04 10:02:17 +00:00
Tomas Votruba
7cda57615c
rename FunctionToStaticCallRector to FuncCallToStaticCallRector (#3895)
* rename FunctionToStaticCallRector to FuncCallToStaticCallRector

* rename FunctionToNewRector to FuncCallToNewRector

* remove RenameFuncCallToStaticCallRector, duplicate of FuncCallToStaticCallRector
2020-08-04 08:25:41 +00:00
Tomas Votruba
97de8eb625
[Generic] FuncCallToMethodCall only in case of parent class (#3894)
* [Generic] Improve FuncCallToMethodCallRector

* [rector] [Generic] Improve FuncCallToMethodCallRector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-03 23:58:03 +00:00
TomasVotruba
5789ef39d5 update docs 2020-08-04 00:21:59 +02:00
Tomas Votruba
e35131524c
[Nette 3.0] Various rules updates (#3878)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-03 09:26:01 +02:00
Tomas Votruba
91bda1b75b
[NetteCodeQuality] Get component (#3870) 2020-08-02 11:39:52 +02: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
TomasVotruba
552a3a9032 update docs 2020-08-01 18:26:17 +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
Marek Šimeček
ab8d290b14
method call remover rector (#3850)
Co-authored-by: Marek Šimeček <marek.simecek@footshop.cz>
2020-08-01 11:49:32 +02:00
TomasVotruba
ff8d6d265b [MagicDisclosure] fluent removal improvements 2020-07-31 19:04:51 +02:00
TomasVotruba
b9fd318ac2 skip on method call 2020-07-30 22:16:38 +02:00
TomasVotruba
dc14ddd0b9 [PHP 8.0] Add ChangeSwitchToMatchRector 2020-07-30 18:19:53 +02:00
TomasVotruba
55b60ead93 improve configured code samples to use constants over direct values 2020-07-30 17:46:36 +02:00
TomasVotruba
0647a0e922 update docs to use call() 2020-07-30 17:42:01 +02:00
TomasVotruba
fe72e003ed use constants in configs 2020-07-30 13:53:53 +02:00
TomasVotruba
d4fc22bd55 fix typo 2020-07-29 10:33:10 +02:00
TomasVotruba
7c01151ec6 Move Core Rector rules to Generic namespace, to prevent mixup with Core code 2020-07-29 02:05:52 +02:00
TomasVotruba
2eddb274c2 use standard __ for vars 2020-07-28 23:54:13 +02:00
Tomas Votruba
1743aa969c
Merge pull request #3808 from rectorphp/case-class 2020-07-27 20:46:15 +02:00
TomasVotruba
8c31bd27e4 [CodeQuality] Add case class name fix 2020-07-27 20:45:41 +02:00
dobryy
6547082ddd [Order] Order any param (Nullable or with default value) that has type of Object 2020-07-27 16:39:34 +02:00
TomasVotruba
d94e529f29 [Nette] Improve AddDatePickerToDateControlRector 2020-07-27 10:44:51 +02:00
TomasVotruba
c28a5a9746 [Celebrity] Merge to code-quality 2020-07-27 10:18:03 +02:00
TomasVotruba
86d8666438 [Nette] move quality rules to nette-code-quality directory 2020-07-26 18:48:18 +02:00
TomasVotruba
0650075005 [Nette] Add ChangeControlArrayAccessToAnnotatedControlVariableRector 2020-07-26 15:54:46 +02:00
dobryy
99494d4c32 [Order] Order __constructor dependencies by type alphabetically 2020-07-26 15:11:28 +02:00
TomasVotruba
dec0975c22 [PHP 8.0] Add ClassPropertyAssignToConstructorPromotionRector 2020-07-26 11:42:14 +02:00
TomasVotruba
350a1be7ba [Nette] Improve AddDatePickerToDateControlRector 2020-07-25 16:23:30 +02:00
TomasVotruba
0c750b7e93 update docs 2020-07-25 12:46:48 +02:00
TomasVotruba
c0fd5a3633 improve docs 2020-07-24 17:28:43 +02:00