11696 Commits

Author SHA1 Message Date
TomasVotruba
f902a94ea8 fix cs 2021-04-06 21:55:23 +02:00
Tomas Votruba
b03536c0f5
Improve token iterator usage (#6046)
* use token iterator

* add spaceless tag

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-06 20:36:50 +02:00
Abdul Malik Ikhsan
b7af3d58f1
[CodeQuality] Add SimplifyIfNullableReturnRector (#6043)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-06 20:25:16 +02:00
Tomas Votruba
31566dc869
Traverse phpdoc with use of PhpDocNodeVisitor (#6045)
* make use of new simple-php-doc-parser

* add ParamPhpDocNodeVisitor

* remove uneeded contracts

* skip bool instanceof

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-06 19:33:09 +02:00
Tomas Votruba
006785559e
Add annotation re-print with colon and equal (#6042) 2021-04-05 17:32:51 +00:00
Tomas Votruba
047045636f
comoser: bump package deps with static doctrine/annotation parser (#6040) 2021-04-05 14:22:24 +00:00
Tomas Votruba
0eec24e342
add reprint test (#6038)
* add failing test case for extended first node

* fix reprint of first node start

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-05 15:25:08 +02:00
TomasVotruba
97edb65302 [CI] test symfony package again 2021-04-05 14:23:22 +02:00
TomasVotruba
e548f02840 improve NewTypeResolver with anonymous class 2021-04-05 14:19:44 +02:00
TomasVotruba
3ce033107d add NewTypeResolver 2021-04-05 14:02:30 +02:00
TomasVotruba
de953e0f37 check for existing keys 2021-04-05 13:14:55 +02:00
TomasVotruba
aa36334e31 enforce php doc node type re-print on change 2021-04-05 12:44:21 +02:00
TomasVotruba
fb1e746157 use strings instead of class-strings 2021-04-05 11:53:03 +02:00
TomasVotruba
e4b6a8d725 null start end, not parent 2021-04-05 11:15:38 +02:00
TomasVotruba
ecb7a3e330 invoke no-reprint on rename 2021-04-05 11:14:23 +02:00
TomasVotruba
5df7837892 remove value with key too 2021-04-05 10:52:32 +02:00
Tomas Votruba
28ebdf833c
Extract AbstractValuesAwareNode to improve working with values (#6036) 2021-04-05 10:40:13 +02:00
TomasVotruba
30418c6131 make inlined var single-lined 2021-04-04 23:02:43 +02:00
TomasVotruba
51190b69cb add removeValue() 2021-04-04 22:51:01 +02:00
TomasVotruba
393031b027 make phpdoc info multiline by default if new node is added 2021-04-04 17:37:28 +02:00
Tomas Votruba
74dc172b74
Misc node printing improvements (#6034)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-04 15:07:52 +00:00
Abdul Malik Ikhsan
6fe05c462c
[DowngradePhp72] Add DowngradePregUnmatchedAsNullConstantRector (#6021)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-04 13:40:55 +02:00
Tomas Votruba
b2412ad62a
Refactor doctrine/annotation from dynamic to own static-reflection parser (#5974)
* remove doctrine/annotations

* Refactor doctrine/annotation parser to static reflection with phpdoc-parser

* remove doctirne-annotation-parser-syncer

* remove annotation stubs

* use nodes

* almost there

* [ci-review] Rector Rectify

* skip temporary

* phpstan: remove fixed messages

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-04 11:01:11 +02:00
Leonardo Losoviz
d2e4c0a5b2
Add failing test fixture for DowngradeParameterTypeWideningRector (#5995)
* Add failing test fixture for DowngradeParameterTypeWideningRector

# Failing Test for DowngradeParameterTypeWideningRector

Based on https://getrector.org/demo/1b8ee6a0-7d50-4fae-8e15-f19d19591fc5

* Fixed automatic test (created buggy)

* Skip traits

* Renamed test
2021-04-02 19:20:16 +02:00
Abdul Malik Ikhsan
4a34bece7d
[CodeQuality] Handle colon in arg value for create variable or MoveOutMethodCallInsideIfConditionRector (#6025)
* [CodeQuality] Handle colon in arg value fto create variable or MoveOutMethodCallInsideIfConditionRector

* regex constant name fix
2021-04-02 18:58:16 +07:00
Tomas Votruba
1224a69c8a
remove unused containsArrayType() method (#6022) 2021-03-31 11:41:32 +00:00
Abdul Malik Ikhsan
12687f02e8
[CodeQuality] Skip CallableThisArrayToAnonymousFunctionRector on forward_static_call function (#6017)
Co-authored-by: Zing <zingimmick@outlook.com>
2021-03-31 10:04:42 +02:00
Tomas Votruba
9e34d0b6cf
remove unused map (#6018) 2021-03-30 15:06:25 +00:00
Tomas Votruba
03c3a6310b
[BetterPhpDocParser] Improve TagValueNodeReprintTest (#6016)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-30 14:24:16 +00:00
Abdul Malik Ikhsan
c060086f69
[Scoper] Fixes #6010 Remove namespaced on polyfill symfony Stubs (#6011) 2021-03-29 18:48:45 +00:00
Tomas Votruba
903e98e28e
remove unused method (#6012)
* remove unused method

* add parseContent() method
2021-03-29 20:45:33 +02:00
Abdul Malik Ikhsan
9229279980
[Scoped] Handle Cannot use RectorPrefix20210329parent as class name as it is reserved on Build docker image (#6009)
* [Scoped] Fix #6007 Handle Cannot use RectorPrefix20210329parent as class name as it is reserved on Build docker image

* regex update to check \ prefix before Prefix namespace
2021-03-29 18:04:23 +00:00
Tomas Votruba
5fa858b072
[DoctrineAnnotationSyncer] Remove to move to static reflection (#6006) 2021-03-29 13:01:35 +00:00
github-actions[bot]
ca8cfa103b
[automated] Apply Coding Standard (#6005)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-03-29 10:31:32 +02:00
Abdul Malik Ikhsan
ce1bad3c3a
[DeadCode] Apply RemoveUnusedVariableAssignRector on unused local variable (#6003)
Co-authored-by: slomanto <s.lomanto@complex-it.de>
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-29 10:30:42 +02:00
Zing
dfaa809847
Return mixed type if property fetch scope is null (#5998) 2021-03-29 10:29:32 +02:00
Abdul Malik Ikhsan
d2404a37b7
[TypeDeclaration] Skip null type on non-private property and not used on PropertyTypeDeclarationRector (#6002) 2021-03-29 10:28:36 +02:00
Abdul Malik Ikhsan
58a0965d76
[CodeQualityStrict] Allow MoveVariableDeclarationNearReferenceRector to pass static call on Throwable instance (#5999) 2021-03-29 10:27:34 +02:00
TomasVotruba
4614068981 wording 2021-03-27 09:51:55 +01:00
Abdul Malik Ikhsan
88f5f5af4c
[Scoped] Add templates on build rector-prefixed-downgraded (#6000) 2021-03-26 15:56:42 +00:00
Zing
ff9173ff35
Stripping quotation marks of argument default value (#5997) 2021-03-26 13:45:54 +07:00
Abdul Malik Ikhsan
b10fc7dab2
[Naming] Allow used outside scope for RenameForeachValueVariableToMatchExprVariableRector (#5990)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-25 22:20:10 +01:00
Abdul Malik Ikhsan
c0f353fe7a
[GitAttributes] Add phpstan-for-rector.neon to .gitattributes (#5986) 2021-03-25 22:14:20 +01:00
Abdul Malik Ikhsan
8d1244f4bb
[DeadCode] Handle RemoveDefaultArgumentValueRector on removal default argument on not last argument (#5982) 2021-03-25 22:14:01 +01:00
Abdul Malik Ikhsan
37db8e75cb
[CodingStyle] Escape content delimiter in pattern for ConsistentPregDelimiterRector (#5988) 2021-03-25 22:10:24 +01:00
Abdul Malik Ikhsan
d266e6935c
[NodeNameResolver] Set return false on node is MethodCall/StaticCall on NodeNameResolver::isName() (#5981)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-24 23:39:29 +01:00
Abdul Malik Ikhsan
45f657004f
[Php71] Skip AssignArrayToStringRector on assign var not defined before (#5985) 2021-03-24 23:36:56 +01:00
Abdul Malik Ikhsan
cee8046e84
[Naming] Skip RenameForeachValueVariableToMatchExprVariableRector on empty singular value name result (#5978) 2021-03-24 23:36:11 +01:00
Abdul Malik Ikhsan
2e8d6091c4
Readme and docs should be included in rector installation (#5973) 2021-03-24 23:35:58 +01:00
Michal Lulco
8290449e2c
Added league event to set list (#5972) 2021-03-24 23:33:48 +01:00