Tomas Votruba
615f0c4ee4
[composer] allow 8.3.* Symplify deps
2020-11-15 15:16:14 +00:00
Abdul Malik Ikhsan
7203ff0770
[DX] Fixes #4588 Enable PreferThisOrSelfMethodCallRector in rector-ci.php ( #4597 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-13 12:15:33 +01:00
Tomas Votruba
7c3e803416
[Carbon 2] Init ( #4595 )
...
* [Carbon] Init new rules
* add ChangeDiffForHumansArgsRector
* [Carbon] Add ChangeCarbonSingularMethodCallToPluralRector
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-13 00:45:58 +00:00
Tomas Votruba
7e3f8bdafc
[Laravel] Add AddMockConsoleOutputFalseToConsoleTestsRector ( #4589 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 21:47:25 +01:00
Tomas Votruba
aa91f11a3f
[Laravel 5.7] Add ChangeQueryWhereDateValueWithCarbonRector ( #4586 )
...
* [Laravel] Add ChangeQueryWhereDateValueWithCarbonRector
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 15:28:50 +00:00
Tomas Votruba
4c6da2c4bf
[Laravel 5.7] Add parent boot rule ( #4580 )
...
* move file to templates, to remove confusion in the root
* use stable symplify
* [Laravel] Add AddParentBootToModelClassMethodRector
* [ci-review] Generate Rector & Nodes documentation
* [ci-review] propagate monorepo dependencies
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-11 17:09:57 +00:00
Krystian Marcisz
a92f4c1e2d
[DoctrineCodeQuality] Remove redundant default values from annotations ( #4542 )
...
* Move duplicated getAttributableItems() method to abstract parent
* Add removeItem() method to AbstractTagValueNode class
* Add RemoveRedundantDefaultAnnotationValuesRector rule with tests
* Link second test case of RemoveRedundantDefaultAnnotationValuesRector
* Add to set and docs
* Rename variable in DoctrineClassAnalyzer::matchDoctrineEntityTagValueNode()
* Remove redundant docblocks in RemoveRedundantDefaultAnnotationValuesRector
* Extract hasItemWithDefaultValue method in RemoveRedundantDefaultAnnotationValuesRector
* Optimize RemoveRedundantDefaultAnnotationValuesRector
* Split rule into two separate: one for Property and one for Class_
* PHP CS Fixer
* PHPStan
2020-11-04 22:51:11 +01:00
Abdul Malik Ikhsan
0cc7b66a1e
[FileSystem] Improve MovedFileWithNodesFactory : SKip if desiredGroupName already inside oldClassName ( #4554 )
2020-11-04 15:55:22 +01:00
Tomas Votruba
93b601cef0
merge AstractGenericRectorTestCase and AbstractRectorTestCase ( #4550 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-03 21:39:57 +01:00
Tomas Votruba
42fcff97e3
remove unused file
2020-11-01 21:33:03 +01:00
Tomas Votruba
297ec316af
move suffix filesystem 3 ( #4540 )
2020-11-01 21:31:13 +01:00
Tomas Votruba
e7c1ded364
fix linter ( #4537 )
2020-11-01 16:57:12 +01:00
Tomas Votruba
c03b66f7cd
move suffix filesystem 2 ( #4529 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-01 16:39:04 +01:00
Tomas Votruba
8542a3bcbc
Move from Filesystem rules to FileNode ( #4528 )
...
* make MoveServicesBySuffixToDirectoryRector with non-filesystem rector
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* [ci-review] Apply coding standards
* fixup! make MoveServicesBySuffixToDirectoryRector with non-filesystem rector
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-31 21:39:09 +00:00
Tomas Votruba
5147844615
change RenameSpecFileToTestFileRector filesystem to normal one ( #4525 )
2020-10-31 16:20:30 +00:00
Christopher Davis
341a3221b8
Add a Doctrine DBAL 2.11 Rule Set ( #4517 )
2020-10-31 14:11:04 +01:00
Tomas Votruba
0513315056
Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node ( #4522 )
...
* Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node
* update DecoupleClassMethodToOwnClassRector
* [ci] add rebase jobp
* disable fail fast for unit tests
* misc
2020-10-31 12:59:40 +00:00
Tomas Votruba
18d2ea2d31
[Nette] Add MoveFinalGetUserToCheckRequirementsClassMethodRector ( #4520 )
...
* [Nette] Add MoveFinalGetUserToCheckRequirementsClassMethodRector
* [Nette] Add MoveFinalGetUserToCheckRequirementsClassMethodRector
* patch final presenter to allow tests
2020-10-31 00:43:54 +00:00
Tomas Votruba
3ed76c6559
[Nette] Add RemoveParentAndNameFromComponentConstructorRector ( #4515 )
...
* [Nette] Add RemoveParentAndNameFromComponentConstructorRector
* add refactorClassMethod()
* add refactorStaticCall()
* add refactorNew() method
* [Nette] Rename AddDatePickerToDateControlRector to AddNextrasDatePickerToDateControlRector
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-30 17:10:17 +00:00
Tomas Votruba
b302e493dd
[SOLID] Add MoveVariableDeclarationNearReferenceRector ( #4410 )
...
* Create test cases
* Create rector
* Add closure to possible parent scopes
* Register in SOLID set
* Document the feature
* fix adding variable in closure
* move MoveVariableDeclarationNearReferenceRector to Assign category, based on getNodeTypes()
* ci: drop phpunit matcher, not much helpful
* ignore for now, many cases to cover
* prepare release
Co-authored-by: Anna Filina <afilina@gmail.com>
2020-10-30 13:25:24 +00:00
Tomas Votruba
dc2047f70a
[TypeDeclaration] Switch from stringy types to PHPStan types ( #4510 )
...
* nette-30 config cleanup
* [TypeDeclaratoin] Move AddReturnTypeDeclarationRector from generic
* add Type support to AddReturnTypeDeclaration
* make AddParamTypeDeclarationRector use PHPStan type objects over strings
* [SymfonyPhpConfig] Add support for nested types
* drop StringTypeToPhpParserNodeMapper
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-30 11:58:35 +00:00
Tomas Votruba
63037fe924
[DynamicTypeAnalysis] Drop for too theoretical content, needs real project to test out ( #4511 )
2020-10-30 00:30:10 +00:00
Tomas Votruba
bc41ba2b2e
phpstan cleanup ( #4509 )
...
* move tag objects to ValueObject namespace
* [ci] temporarily disable weird broken monorepo split, wait for move to github actoins
2020-10-29 23:06:26 +01:00
Tomas Votruba
5d190a3d55
phpstan cleanup config ( #4507 )
2020-10-29 21:34:51 +00:00
Tomas Votruba
91a354c080
[NetteCodeQuality] Fix ChangeFormArrayAccessToAnnotatedControlVariableRector for in-closure ( #4506 )
...
* [NetteCodeQuality] Fix ChangeFormArrayAccessToAnnotatedControlVariableRector for in-closure
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* fix name
* fix unknown mixed type on fluent
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-29 21:25:35 +00:00
Abdul Malik Ikhsan
a2ae659e0a
[CodeQualityStrict] Enable MoveOutMethodCallInsideIfConditionRector ( #4502 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-29 21:47:12 +01:00
Abdul Malik Ikhsan
449801e1f3
Add regex uri to regex constant ( #4504 )
...
Co-authored-by: Jan Lohage <j2L4e@users.noreply.github.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-29 19:04:33 +01:00
Abdul Malik Ikhsan
9e0b632e4e
[CodeQualityStrict] Add CountArrayToEmptyArrayComparisonRector to CodeQualityStrict ( #4496 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-10-29 09:59:39 +01:00
Raffael Comi
2e44469c94
Return also explicitly mixed types in IdentifierTypeMapper ( #4483 )
2020-10-28 21:51:56 +01:00
Raffael Comi
7bd20258bc
Map iterable in ScalarStringToTypeMapper ( #4482 )
...
* Map iterable in ScalarStringToTypeMapper
* Add test
2020-10-28 21:42:17 +01:00
Tomas Votruba
44b27f779e
[EarlyReturn] Decouple new set ( #4490 )
...
* [set] decouple new code-quality-strict
* decopule early-return set [closes #4464 ]
* [docker] drop prestissimo, as composer v2 does not need it
* [ci] move coding standard to ci_review
* [ci] try to run rector-ci on contributors
2020-10-27 13:47:37 +00:00
Abdul Malik Ikhsan
7a1ea1328b
[CodeQuality] Register MoveOutMethodCallInsideIfConditionRector to config code-quality set ( #4477 )
...
* [CodeQuality] Register MoveOutMethodCallInsideIfConditionRector to config code-quality set
* rename use string parameter
* phpstan
* fix false positive string param to be var === variable name
* fix false positive
* phpstan
* ensure not same variable
* phpstan
* add ucfirst after var
* add fixture failing test for variable exists to be skipped
* add fixture failing test for variable exists in previuos statement
* phpstan space
* add handling variable exists in previous statement and in ClassMethod/Functions args
* handle exists but inside if
* reduce complexity
* clean up
* clean up
* cs fix
* phpstan
* remove - in variable
* use fallback when first character is numeric
* using regex to check string start alpha for variable
* cs fix
* use ClassConstFetch name to set variable name
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* clean up
* fix
* [ci-review] Rector Rectify
* Update rules/code-quality/src/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php
* Update rules/code-quality/src/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-10-26 14:03:26 +00:00
Tomas Votruba
20e95bee61
[CI] Run ECS only on match git diff ( #4487 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-26 12:28:32 +01:00
Tomas Votruba
6f56d0dfbe
[docs] apply correct standard on dumper Rector list + apply automated CI commit on propagate monorepo deps ( #4481 )
2020-10-26 00:22:53 +01:00
Tomas Votruba
0f2e6d407e
[DoctrineAnnotaitonGenerated] Update to doctrine/annotations 1.11 + fix static ( #4479 )
2020-10-25 14:43:05 +01:00
Tomas Votruba
6c51f3fb4f
[Restoration] Add InferParamFromClassMethodReturnRector ( #4471 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-21 23:06:24 +02:00
Tomas Votruba
75d25a1dcb
[CodeQuality] Decouple complete dynamic properties rector, add skip of Closure::bind() ( #4466 )
...
* [ci] temporarily hide split monorepo
* [CodeQuality] Decouple complete dynamic properties rector, add skip of bind()
* [rector] [CodeQuality] Decouple complete dynamic properties rector, add skip of bind()
* [cs] [CodeQuality] Decouple complete dynamic properties rector, add skip of bind()
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-20 20:27:12 +00:00
Tomas Votruba
5988584736
[CodeQuality] Improve missing property type resolution for array dim fetch ( #4462 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-20 20:35:35 +02:00
TomasVotruba
e59cb4c244
try chaing package
2020-10-19 17:30:57 +02:00
Tomas Votruba
9869678e4a
[DeadCode] Fix removal of if->cond ( #4450 )
2020-10-19 16:38:02 +02:00
Tomas Votruba
c18b06b474
[DeadCode] Cover array dim fetch assign ( #4446 )
2020-10-19 01:46:38 +02:00
Tomas Votruba
29594b63f4
[DeadCode] Count arg value as used ( #4445 )
2020-10-18 23:18:04 +00:00
Tomas Votruba
f96372e1c0
make use of Types of doc types ( #4444 )
2020-10-18 21:49:54 +02:00
Tomas Votruba
e845d7cea8
[DoctrineCodeQuality] Add ImproveDoctrineCollectionDocTypeInEntityRector ( #4442 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-18 18:29:35 +02:00
Tomas Votruba
fd9bd00713
[DoctrineCodeQuality] Fix oveCurrentDateTimeDefaultInEntityToConstructorRector for default value ( #4436 )
...
* [DoctrineCodeQuality] Fix oveCurrentDateTimeDefaultInEntityToConstructorRector for default value
* re-use local property method
* improve new_ nesting
* [rector] improve new_ nesting
* static fixes
* bump deps
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-18 08:45:56 +00:00
Tomas Votruba
af1928c64f
Decouple CachedFileInfoFilterAndReporter ( #4434 )
...
* decouple CachedFileInfoFilterAndReporter
* fix cs
2020-10-17 15:33:57 +00:00
Tomas Votruba
9f7073ada3
[NodeAnalyzer] Check property fetch for read ( #4431 )
...
* [NodeAnalyzer] Check property fetch for read
* [ReadWrite] Decopule new package for read/write/only analysis
* add property fetch
2020-10-16 20:16:36 +00:00
Tomas Votruba
b7e3dad887
add doctrine embedded php doc node ( #4424 )
...
* Add a tag value node for Doctrine Embedded tags
* fix getter name
Co-authored-by: Matthias Noback <matthiasnoback@gmail.com>
2020-10-15 20:48:23 +00:00
Tomas Votruba
16031da4b7
[DeadCode] Fix binary different nesting in RemoveOverriddenValuesRector ( #4422 )
...
* decopule NodeByTypeAndPositionCollector
* decouple VariableUseFinder
2020-10-15 20:23:25 +00:00
TomasVotruba
0fd311cb16
fix indent
2020-10-15 14:16:31 +02:00