1906 Commits

Author SHA1 Message Date
Tomas Votruba
e85dbf0422
[PHP 7.0] Cover named ctor with for (#6064) 2021-04-09 15:07:21 +00:00
Tomas Votruba
8e8446a909
remove METHOD_NAME attribute to promote single source of node (#6063) 2021-04-09 12:45:07 +02:00
Tomas Votruba
6ced3bd32a
Add upgrade path to Rector 0.10 - upgrade set included (#6061)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-09 01:12:42 +00:00
Tomas Votruba
cb60705d78
Restore parent relations on new nodes (#6057) 2021-04-08 12:44:26 +00:00
Abdul Malik Ikhsan
eb3aba0645
[CodeQuality] Fix SimplifyIfNullableReturnRector code sample before after (#6056) 2021-04-08 11:03:02 +00:00
Abdul Malik Ikhsan
a60748dc41
[DeadCode] Skip RemoveUnusedVariableAssignRector on used in Method call and PropertyFetch name (#6053)
* Add failing test fixture for RemoveUnusedVariableAssignRector

* Closes #6051

* cs

Co-authored-by: zingimmick <zingimmick@outlook.com>
2021-04-07 18:56:29 +02:00
Tomas Votruba
32a7122444
remove unneeded TagValueNodeConfiguration (#6050) 2021-04-07 14:09:15 +00:00
Abdul Malik Ikhsan
0a9c6a8400
[CodeQuality] Register SimplifyIfNullableReturnRector to code-quality config set (#6047)
* [CodeQuality] Register SimplifyIfNullableReturnRector to code-quality config set

* handle next expression

* handle next expression

* handle next expression

* naming

* phpstan

* fixture fix

* fix

* check next early

* mirror comment not @var

* phpstan

* phpstan

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* phpstan

* more fixture for mirror comment without @var

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-07 00:00:14 +02:00
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
047045636f
comoser: bump package deps with static doctrine/annotation parser (#6040) 2021-04-05 14:22:24 +00:00
Tomas Votruba
28ebdf833c
Extract AbstractValuesAwareNode to improve working with values (#6036) 2021-04-05 10:40:13 +02: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
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
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
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
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
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
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
Tomas Votruba
aae346b64f
[DeadCode] Skip RemoveDeadInstanceOfRector for traits (#5970) 2021-03-23 23:33:15 +00:00
Tomas Votruba
627d3f721f
[TypeDeclaration] Fix interface contract override by docs (#5965) 2021-03-23 23:31:21 +00: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
Michal Lulco
2d469d3068
Added upgrade league/event to 3.0 (#5929) 2021-03-23 12:49:40 +01:00
TomasVotruba
e7117092bf update to doctrine package 2021-03-22 02:31:22 +01:00
Tomas Votruba
0964e8c3d7
[Doctrine] Decopule to own package (#5943)
* [Doctrine] Decopule to own package

* move Doctrine outside
2021-03-22 01:53:42 +01:00
Tomas Votruba
4f27f39e70
Remove dynamic type checks #3 (#5942) 2021-03-21 23:07:40 +00:00
Tomas Votruba
ae1c6b90f7
Remove dynamic type checks #2 (#5941) 2021-03-21 21:31:18 +00:00
Tomas Votruba
a781b3bd12
Remove dynamic type checks (#5939) 2021-03-21 19:41:17 +01:00
Tomas Votruba
4d760ddf44
[PHPStan] Add NoIsAStaticReflectionRule (#5937)
* [PHPStan] Add NoIsAStaticReflectionRule

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-21 15:12:38 +01:00
Tomas Votruba
89a7afb5a4
Merge DeadDocBlock to DeadCode (#5936) 2021-03-21 12:57:56 +00:00
Abdul Malik Ikhsan
747104df6b
Refactor is_a (#5907)
* Change is_a to UnionType()->isSuperTypeOf()->yes in NetteControlFactoryInterfaceAnalyzer

* fix with check ShortenedObjectType

* change is_a in ThrowWithPreviousExceptionRector
2021-03-21 13:12:35 +01:00
TomasVotruba
0693fff578 update to rector-symfony phpdoc nodesfs 2021-03-21 12:35:41 +01:00
Abdul Malik Ikhsan
7e16399ddb
[DeadCode] Skip RemoveUnusedPrivateMethodRector when class has magic __call (#5932) 2021-03-21 10:52:15 +01:00
TomasVotruba
94fd5af4f8 make use of external symfony doc nodes 2021-03-21 01:38:09 +01:00
Tomas Votruba
68026636bf
[PHP 8.0] Refactor attributes from magic interface to explicit list (#5926) 2021-03-20 23:16:21 +00:00
Tomas Votruba
44375f6637
Post Nette tags split cleanup (#5925)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-20 21:47:40 +00:00
Tomas Votruba
b28b8742fc
use rector-nette with tags (#5924)
* use rector-nette with tags

* redirect Kdyby sets

* use local ParamAnalyzer
2021-03-20 22:16:54 +01:00
TomasVotruba
b3536831fa move nette tags to own package 2021-03-20 21:16:07 +01:00
TomasVotruba
e13c2ecfd5 update decoupled tags 2021-03-20 21:10:34 +01:00