10644 Commits

Author SHA1 Message Date
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
TomasVotruba
0326aec71c renames on regex 2020-12-25 00:28:36 +01:00
TomasVotruba
d337b5753f cleanup 2020-12-25 00:18:02 +01:00
TomasVotruba
b911612ba3 fix yaml suffix 2020-12-24 23:05:50 +01:00
Tomas Votruba
5a47e36b72
Add Visibility consts (#4981) 2020-12-24 23:01:30 +01:00
Tomas Votruba
d03fb14c3f
fix parent visilibty (#4980) 2020-12-24 21:58:07 +01:00
TomasVotruba
9c2cde103c update dockerignore 2020-12-24 17:45:45 +01: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
Abdul Malik Ikhsan
9433616c63
[EarlyReturn] Add ChangeOrIfReturnToEarlyReturnRector (#4974)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-24 14:20:16 +01:00
Abdul Malik Ikhsan
cb5a36434e
[PHP 7.4] Skip TypedPropertyRector on standalone null type (#4972)
Fixes #4956
2020-12-24 11:02:32 +01:00
TomasVotruba
8771bffab4 fix path 2020-12-24 00:48:35 +01:00
Tomas Votruba
f6900e687c
[PHP 8.0] Skip exception in match, must be expr (#4971)
* [PHP 8.0] Skip exception in match, must be expr

* add test case for var strings

* [ci-review] Rector Rectify

* skip universal

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-23 23:44:16 +00: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
Abdul Malik Ikhsan
8a648216ca
[CodingStyle] Re-use assigned variable for Method/Static/FuncCall/New_ on SplitDoubleAssignRector (#4968) 2020-12-23 21:42:40 +01:00
Tomas Votruba
aa35633c66
use getService() API call over static (#4970) 2020-12-23 21:40:46 +01:00
Abdul Malik Ikhsan
0e60e709e5
[CodingStyle] Skip SymplifyQuoteEscapeRector on \n\t (#4966) 2020-12-23 20:07:12 +01:00
Abdul Malik Ikhsan
2b001a542e
[Solid] Skip ChangeReadOnlyVariableWithDefaultValueToConstantRector on byRef parameter (#4964)
* [Solid] Fixes #4959 skip ChangeReadOnlyVariableWithDefaultValueToConstantRector on byRef parameter

* better check

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-23 16:55:35 +00:00
Abdul Malik Ikhsan
c11a506b2b
[PHP 7.0] Skip StaticCallOnNonStaticToInstanceCallRector on dynamic static call (#4962)
* [PHP 7.0] Fixes #4954 Skip StaticCallOnNonStaticToInstanceCallRector on dynamic static call

* fixture
2020-12-23 15:37:17 +01:00
Abdul Malik Ikhsan
cd58dd958e
[CodingStyle] Skip CatchExceptionNameMatchingTypeRector on variable previously defined (#4960)
* [CodingStyle] Fixes #4946 Skip CatchExceptionNameMatchingTypeRector on variable previously defined

* move functionality look up previous node first with parent check to BetterNodeFinder

* cs fix

* better check
2020-12-23 15:33:14 +01:00
Abdul Malik Ikhsan
4eab2c4520
[CodingStyle] Failing fixture for MakeInheritedMethodVisibilitySameAsParentRector prepend public to protected on static (#4951)
* [CodingStyle] Failing fixture for MakeInheritedMethodVisibilitySameAsParentRector prepend public to protected on static

* fixed

* clean up

* patch ChangeMethodVisibilityRectorTest
2020-12-23 15:28:30 +01:00
TomasVotruba
01e6554600 [github] update issue template 2020-12-22 23:31:53 +01:00
Abdul Malik Ikhsan
48eaa5c950
[CodeQuality] Fixes #4950 Skip IssetOnPropertyObjectToPropertyExistsRector on property as variable (#4953) 2020-12-22 23:21:12 +01:00
Abdul Malik Ikhsan
9e6365cc58
[CodeQuality] Register SwitchNegatedTernaryRector to code-quality config set (#4947)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-22 22:01:19 +01:00
Abdul Malik Ikhsan
24e17588c1
[Utils] Run validate-fixture-namespace/classname to rules/ directories (#4935) 2020-12-22 18:12:20 +01:00
Abdul Malik Ikhsan
003314b958
[CodeQuality] Add SwitchNegatedTernaryRector (#4940)
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-22 18:10:01 +01:00
Abdul Malik Ikhsan
8a39d6edbd
[DeadCode] Skip RemoveEmptyClassMethodRector on final method in non-final class (#4943) 2020-12-22 18:09:51 +01:00
Tomas Votruba
a3db386854
drop ecs-after-rector, recommend current setup (#4944) 2020-12-22 17:14:24 +01:00
Tomas Votruba
cfcb237612
Delete test 2020-12-22 17:12:49 +01:00
Tomas Votruba
c97c769781
test 2020-12-22 17:12:11 +01: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
Abdul Malik Ikhsan
34e6c6ffdf
[Doc] Using transparent image for space.png (#4934) 2020-12-21 12:15:19 +01:00
Abdul Malik Ikhsan
8bccfd9bcf
[BetterStandardPrinter] Remove unneded cleanUpDuplicateContent() (#4933) 2020-12-21 11:57:39 +01:00
TomasVotruba
06afa2bc94 remove commented code 2020-12-21 10:42:03 +01:00
Tomas Votruba
a759f1ffbc
Static fixes 3 (#4930)
* cleanpu baseline

* static fixes

* staitc fixes

* [Naming] Remove dead classes UnderscoreCamelCaseParamRenamer and MatchTypeParamRenamer

* static fixes

* value object fixes

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-21 02:12:42 +00:00
Tomas Votruba
d1e48f462a
Static fixes (#4929)
* static fixes

* fixup! static fixes

* fixup! fixup! static fixes

* fixup! fixup! fixup! static fixes
2020-12-20 21:27:30 +00:00
Tomas Votruba
37b3cecda3
Upgrade to php-parser 4.10.4 and PHPStan 0.12.63 (#4926)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-20 22:05:48 +01:00
Tomas Votruba
2c8a76ef12
[Naming] add failing test case for type property collection name (#4863)
* add failing test case for type property collection name

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-20 15:10:06 +00:00
Charlie
c044b8ae97
Keep colon when it's used in Doctrine tag's original content. (#4924)
Co-authored-by: Charlie <charlie.vieillard@pixelindustries.com>
2020-12-20 13:58:04 +01:00
Abdul Malik Ikhsan
7f674d7c8b
Using $this->mirrorComments() from AbstractRector to keep comment (#4923)
* Using $this->mirrorComments() from AbstractRector to keep comment

* fix

* fix

* clean up

Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-12-20 13:56:43 +01:00
Tomas Votruba
574c7cd174
[static] Narrow param types, remove duplicated methods (#4921)
* narrow types and other static fixes

* duplicates static fixes

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-20 13:50:55 +01:00
TomasVotruba
32eba83751 recomment 2020-12-20 00:43:59 +01:00
TomasVotruba
b7c6e2b7c0 apply cs 2020-12-19 23:37:11 +01:00
Abdul Malik Ikhsan
720b2c34eb
[EarlyReturn] Enable ReturnBinaryAndToEarlyReturnRector in early-return config set (#4915)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-19 16:24:53 +01:00
Abdul Malik Ikhsan
11d36a4bf9
[EarlyReturn] Add ReturnBinaryAndToEarlyReturnRector (#4906)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-19 09:56:24 +01:00
Abdul Malik Ikhsan
511a9ac777
[Symfony Code Quality] Fixes EventListenerToEventSubscriberRector do not replace method call properly (#4908)
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
Co-authored-by: Flohw <git@f-pa.site>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
Co-authored-by: Flohw <flohw@users.noreply.github.com>
2020-12-19 09:51:44 +01:00
Leonardo Losoviz
20622c2541
Added tests for RenameVariableToMatchNewTypeRector (#4898)
* Added tests to fix issue

* Removed tests placed with wrong rule

* Added test with right rule

* Simplified className

* fixed

* [ci-review] Rector Rectify

Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-18 23:18:17 +01:00
Abdul Malik Ikhsan
6c813e5e4d
[Solid] Skip MoveVariableDeclarationNearReferenceRector when next statement has static call (#4914)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-18 18:18:40 +01:00
HDVinnie
4436ba62eb
fix: checkstyle.md (#4912)
- simple typo
2020-12-17 22:18:14 +07:00
Tomas Votruba
06f1b3a5b5
[UPGRADE] Add Rector 0.9 upgrade docs (#4907) 2020-12-17 16:08:06 +01:00