311 Commits

Author SHA1 Message Date
Tomas Votruba
cabe032008
[static] Improve types (#5657)
Co-authored-by: Ruud Kamphuis <ruudk@users.noreply.github.com>
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-23 01:25:34 +00:00
Tomas Votruba
5ba33240ca
Bump to Symplify 9.2.1 (#5655) 2021-02-22 20:05:33 +00: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
054de822ed
[DoctrineCodeQuality] Add tests (#5540)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-14 19:51:04 +00:00
Abdul Malik Ikhsan
01360925b2
[EarlyReturn] Add ReturnAfterToEarlyBreakRector (#5529)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-14 10:53:04 +01:00
Tomas Votruba
6ce792c70a
[CodingStyle] Drop AnnotateThrowablesRector to narrow code scope, designed for custom community rule (#5528) 2021-02-13 15:19:19 +01:00
Tomas Votruba
e822db8625
moving ArrayPartPhpDocTagPrinterTrait and PrintTagValueNodeTrait to services (#5473) 2021-02-09 14:17:25 +00:00
Tomas Votruba
f3b05c714c
[PHPUnit] Improve TryCatchToExpectExceptionRector complexity (#5465)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-09 00:42:47 +01:00
Tomas Votruba
fd8fc59ce1
[PHPStanExtensions] Move decoupled KeepRectorNamespaceForRectorRule (#5451) 2021-02-07 21:22:03 +00:00
Abdul Malik Ikhsan
946b1ac84b
[Privatization] Register MakeOnlyUsedByChildrenProtectedRector to privatization config set (#5434)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-06 20:41:44 +01:00
Abdul Malik Ikhsan
484676325a
[DeadDocBlock] Rollback other_comment_before_var.php.inc for RemoveNonExistingVarAnnotationRector (#5412)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-03 15:22:50 +01:00
Tomas Votruba
b6b8ac0c4c
Less traits 3, drop duplicated issue tests (#5385) 2021-01-31 00:14:13 +00:00
Tomas Votruba
c8da4517ec
drop addBareTag() method (#5379) 2021-01-30 18:12:24 +00:00
Tomas Votruba
e1310abebb
[Nette 3.0] Add #[Inject] attribute (#5376) 2021-01-30 15:06:43 +00:00
Tomas Votruba
2df4732c6c
Move Architecture to Doctrine, improve a bit (#5374) 2021-01-30 08:57:35 +00:00
Tomas Votruba
a4a490d69a
[Generics] Skip existing tag and add nullable type support (#5367) 2021-01-29 20:23:01 +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
94dedf4bb3
[PHP 7.0] Update self in final class (#5304) 2021-01-24 20:12:02 +00:00
Abdul Malik Ikhsan
31f357d6c0
[BetterPhpDocParser] Handle parseString() got ShouldNotHappenException (#5299)
* Fixes #5267

* cs fix

* use true for 3rd parameter is_a

* try use method_exists

* patch in BetterPhpDocParser

* clean

* clean

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* phpstan

* phpstan

* phpstan

* add test case

* better solution

* phpstan

* phpstan

* clean up

* clean up

* phpstan

* clean up

* final touch: use ObjectType check instead

* better approach

* ensure $phpDocInfo->getVarTagValueNode() instanceof VarTagValueNode as well

* clean up

* use of the VarTagValueNode

* use of the VarTagValueNode

* use of the VarTagValueNode

* [ci-review] Rector Rectify

* phpstan

Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-24 17:46:06 +01:00
TomasVotruba
e714623b95 fix cs 2021-01-23 01:15:57 +01:00
Tomas Votruba
87072b597d
PHP 7.4 8 typo (#5290) 2021-01-22 23:11:10 +00:00
Tomas Votruba
8b6b1a81e8
misc (#5276)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-21 21:58:26 +01:00
Tomas Votruba
87494ce3a6
Print only changed docblocks 🎉🎉🎉 (#5251) 2021-01-20 16:17:59 +00:00
Abdul Malik Ikhsan
c2c5228199
[TypeDeclaration] Improve FlipTypeControlToUseExclusiveTypeRector : add Nullable support for Assign expr (#5254)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-20 11:41:35 +00:00
Tomas Votruba
34168ff9d8
various cherry picks (#5248) 2021-01-19 23:29:52 +00:00
Tomas Votruba
05356b393a
Getting rid of attribute (#5246)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-19 22:32:28 +01:00
Tomas Votruba
4b7f6f4a72
use PhpDocTagRemoer as a service (#5242)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-19 19:45:30 +00:00
Tomas Votruba
66d0b61a9d
[Comments] Decouple new package (#5239)
* [Comments] Decopule new package

* fix RemoveNonExistingVarAnnotationRector

* decopule PropertyFetchFinder

* misc

* fix fixed printer

* fix import

* remove dead code

* fix comparing nodes with tokens instead of identical compare

* remove complexity

* decouple IndentCharacterDetector

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-19 19:11:10 +00:00
Tomas Votruba
133322cc65
cherry pick (#5238)
* misc

* decopule DocBlockManipulator misc

* make use static instnaceof

* add markAsChanged() to PhpDocInfo

* decopule DocBlockTagReplacer

* change static annotation naming to service

* misc
2021-01-19 15:03:26 +00:00
Jarek Jakubowski
477ccbb2ba
Fix parsing JoinTable without table name explicitly set (#5236) 2021-01-19 15:46:38 +01:00
Abdul Malik Ikhsan
6b196a96ea
[TypeDeclaration] Register FlipTypeControlToUseExclusiveTypeRector to type-declaration set (#5223)
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2021-01-19 12:24:48 +01:00
Tomas Votruba
bbe758ab60
phpdoc info refactor part 4 (#5231)
* remove useless docblocks

* misc

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-19 01:15:32 +00:00
Tomas Votruba
ad9448018c
[PhpDocInfo Decouple] Use php doc info from factories, not from attribute (#5229)
* use single method to create docs

* use phpDocInfoFactory instead of getAttribte php doc info in Rectors

* move callig to phpDocInfoFactory

* misc
2021-01-18 21:45:13 +00:00
Tomas Votruba
b9bc05aa44
[PhpDocInfo Decopule] Refactor PhpDocTypeChanger outside the value object (#5226)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-18 20:06:02 +00: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
56409c5a3a
[phpstan] Remove unreported errors and duplicated methods (#5193)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-15 21:27:36 +01:00
Tomas Votruba
713915d1b2
Polishing composer rules (#5170)
* [Composer] Add check for existing compsore.json

* update composer package

* coding style

* various static fixes
2021-01-13 13:02:14 +00:00
Tomas Votruba
6c11a254aa
[SymfonyCodeQuality] Add ExtractAttributeRouteNameConstantsRector (#5140)
* [SymfonyCodeQuality] Add ExtractAttributeRouteNameConstantsRector

* optimizations
2021-01-11 20:12:10 +00:00
TomasVotruba
859fd4f327 fix forgotten array 2021-01-09 16:07:53 +01:00
TomasVotruba
d59aa8dfd6 use array arguments on privates caller 2021-01-09 15:51:10 +01:00
Tomas Votruba
bc0113dbd7
use templates (#5116) 2021-01-08 23:30:33 +01:00
Tomas Votruba
59b71e04a3
respect PHPStan descission to drop & in param docs (#5035)
* revert phpdoc support for reference in params

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-29 11:12:32 +00:00
Tomas Votruba
8ed61a7560
Add support for inheritdoc in parent type use (#5020)
Co-authored-by: Jan Kuchař <honza@kucharovi.cz>
2020-12-28 17:57:21 +01:00
Tomas Votruba
0f221f92a4
Add template annotation resolving support (#5019)
Co-authored-by: Jan Kuchař <honza@kucharovi.cz>
2020-12-28 13:01:27 +00: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
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
319d6bfca1
add phpstan-for-rector config path, consolidate return type extensions - re-use from Symplify (#4973)
* add phpstan-for-rector config path, to separate phpstan and extensions that help Rector with precise types

* move type value object to value object

* moving

* remove KernelGetContainerAfterBootReturnTypeExtension, use one from symplify

* remove ContainerGetDynamicMethodReturnTypeExtension to ContainerGetReturnTypeExtension

* remove nette extension

* add nette-extension

* removed delegated rule

* delegate implmenets + code sample PHPStan rule to symplify
2020-12-24 16:31:24 +00:00
Abdul Malik Ikhsan
ca0b4cfdc7
[EarlyReturn] Register ChangeOrIfReturnToEarlyReturnRector to early-return set (#4975)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-24 17:28:56 +01:00
Tomas Votruba
61e1ceaf5c
Cover ArrayShape type and other doc nodes (#4967)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-23 22:11:37 +01:00
Tomas Votruba
aa35633c66
use getService() API call over static (#4970) 2020-12-23 21:40:46 +01:00