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
58d97b9853
[Naming] Fix Param type Promoted Rename ( #5188 )
...
* [Naming] Make RenameParamToMatchTypeRector skip promoted property
* [Naming] Add property rename to RenamePropertyToMatchTypeRector
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-14 22:44:07 +00: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
TomasVotruba
e71a107b1b
[SymfonyCodeQuality] Create value object in one step
2021-01-12 01:04:45 +01:00
Leonardo Losoviz
9f8f5e9562
[Downgrade PHP 7.4] Remove self return type ( #5146 )
...
* Added tests
* Map "self" type
* Implemented Rector
* Use className as param
* Fixed PHPStan
* Added rector to set
2021-01-11 23:14:54 +01:00
Tomas Votruba
6c11a254aa
[SymfonyCodeQuality] Add ExtractAttributeRouteNameConstantsRector ( #5140 )
...
* [SymfonyCodeQuality] Add ExtractAttributeRouteNameConstantsRector
* optimizations
2021-01-11 20:12:10 +00:00
Tomas Votruba
20588b78a0
[DeadCode] Remove right part of unused assign ( #5135 )
2021-01-10 19:13:28 +00:00
Tomas Votruba
8d66581b58
[CodingStyle] Skip on class-string string subtype ( #5133 )
...
* [CodingStyle] Skip on class-string string subtype
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-10 18:57:16 +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
7d441c1806
fix offset type ( #5119 )
...
* fix offset type
* skip ChangeGlobalVariablesToPropertiesRector if empty
2021-01-09 10:50:47 +00:00
Tomas Votruba
2cf2ee3f41
fix exclusion annotation for non-class rector descripton + simplify ( #5117 )
...
* fix exclusion annotation for non-class rector descripton + simplify
* add HasOffsetTypemapper
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-09 00:20:28 +00:00
Tomas Votruba
bc0113dbd7
use templates ( #5116 )
2021-01-08 23:30:33 +01:00
Tomas Votruba
d478992160
Fix deprecated ref() to service() function, skip empty file ( #5112 )
...
* composer: bump to symfony/dependency-injection 5.1, required as minimum by other deps anyway
* use service() over deprecated ref()
* skip empty files
* skip just created props
2021-01-08 14:04:35 +00:00
Abdul Malik Ikhsan
524b578628
[PostRector] Skip re-import name on callable name node ( #5022 )
...
* [PostRector] Fixes #3383 Skip import name on callable node
* check function_exists()
* fix
* [ci-review] Rector Rectify
* make keep working on existing test
* try use isFoundInUse from ClassNameImportSkipper
* use ClassNameImportSkipper usage
* callable check
* try without is_callable() check
* try using ! function_exists() with \ prefix
* try again with is_callable return early
* fixed
* [ci-review] Rector Rectify
* works?
* fix
* fix
* reduce code complexity
* final touch
* namespace fixture fix
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-07 19:27:31 +01:00
Abdul Malik Ikhsan
ae1e74a89d
[DeadCode] Failing fixture for not removing method parameter used on RemoveUnusedPrivatePropertyRector ( #5095 )
...
* [DeadCode] Failing fixture for not removing method parameter used on RemoveUnusedPrivatePropertyRector
* Fixes #5088
* return type
* fixture rename
* use findFirstParentInstanceOf as it may inside another, eg: assign
* phpstan
* clean up
* clean up
* skip construct
* instanceof New_ check
* fix
* final touch
* identifier check
* reduce complexity
* use toString()
* final touch
* php 7.3 syntax
2021-01-06 01:28:51 +00:00
Abdul Malik Ikhsan
1ddaf53bee
[DeadCode] Skip RemoveUnusedPrivatePropertyRector on isset as well ( #5085 )
...
* handle isset as well
* method name
* handle under isset
* fix fixture
2021-01-04 18:35:33 +01:00
Abdul Malik Ikhsan
625e3026ff
[DeadCode] Skip RemoveUnusedPrivatePropertyRector on property fetch in unset ( #5084 )
...
* [DeadCode] Fixes #5076 Skip RemoveUnusedPrivatePropertyRector on property fetch in unset
* fixture
* phpstan
2021-01-04 14:08:59 +01:00
Tomas Votruba
e081d8e22c
[DeadCode] Check for child constant usages too ( #5077 )
2021-01-03 10:44:22 +00:00
Abdul Malik Ikhsan
e6dc7c300a
[FlySystem 2.0] Add Upgrade set for MethodCallRename ( #5068 )
2021-01-02 17:13:59 +01:00
Tomas Votruba
6ddb4effd8
[PHPStanStaticTypeMapper] Add closure conversion ( #5043 )
2020-12-29 21:22:48 +00: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
TomasVotruba
7176cd62f8
remove dead half fetch
2020-12-28 19:20:40 +01:00
Tomas Votruba
cdf3c97b60
[RectorGenerator] Test interactive generator ( #5023 )
...
* apply cs
* [RectorGenerator] Add compare dir test for interactive mode
* add PackageNamesProviderTest
* add NodeTypesProviderTest
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-28 18:20:12 +00:00
Krystian Marcisz
94a4bb7777
[DX] Add Interactive Mode to Generate command ( #4931 )
...
* Add Interactive Mode to Generate command
* CS Fixer
* Unify names
* Unify names
* Fixes
* Fixes
* Fixes
* Check generated tests against the "special hack for PHPUnit"
* Re-use the same input/output in the Generate Command
* Add test for Interactive Mode of Generate Command
* Rename test file
* Use ::class instead of string
* Create Finder instance where it's used
* Create RectorRecipeInteractiveProvider service
* Create RectorRecipeInteractiveProvider service
* Bring back SymfonyStyle as DI service
2020-12-28 18:00:51 +01: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
a7544e85e1
Cleanup exclusion manager test ( #5012 )
...
* merge CODING_STYLE_ADVANCED to CODE_QUALITY_STIRCT
* rename split ExclusionManager test to single one
2020-12-27 23:24:28 +00:00
Tomas Votruba
34a2a497b3
[scoper] symplify prefix pick ( #5011 )
...
* use local composer.json for scoped dir
* remove dead directory
* remove dynamic return type extension, not used
* [ci] add along phpstan install
* [scoper] add psr-4 prefixing
2020-12-27 20:31:30 +00: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
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
Abdul Malik Ikhsan
ec5daad132
[Util] Add StaticInstanceOf ( #4979 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 12:53:26 +01: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
5a47e36b72
Add Visibility consts ( #4981 )
2020-12-24 23:01:30 +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
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
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
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
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
3489c8a9ff
[Utils] Run validate-fixture-namespace/classname to packages ( #4902 )
2020-12-15 20:40:13 +01:00
Tomas Votruba
a8a0030bf9
Move package to 1st position in recipe ( #4882 )
...
* add alias
* [recipe] enable set by default, most contributors are core
* move package to 1st place, close to rule name where we think about package
* [ci-review] Rector Rectify
* fix recipe test
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-14 16:24:33 +00:00
Tomas Votruba
f197e25793
droping events ( #4865 )
...
* drop unused ReportCollector and releted avain chains
* update fixed comma trail downgrade in php-parser
* add post runner interface
* [CodingStyle] Enabe post-inc-dec
* [ci-review] Rector Rectify
* test ci
* bump phpunit
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-12 14:58:47 +00:00