90 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
Abdul Malik Ikhsan
24e17588c1
[Utils] Run validate-fixture-namespace/classname to rules/ directories (#4935) 2020-12-22 18:12:20 +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
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
Tomas Votruba
d131d804d9
Bump min PHP version to 7.3 (#4838)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-09 23:25:53 +01:00
Tomas Votruba
267989bb05
[Docs] Add docblock docs (#4740)
* skip getUser() as the method is final

* drop comment along with removed node, as in other removed nodes

* [docs] add doc block docs
2020-12-01 01:09:50 +00:00
Tomas Votruba
080e5cbe00
use symplify/skipper (#4689) 2020-11-26 23:09:21 +01:00
Abdul Malik Ikhsan
a38debb672
[DX] Fixes #4205 Change phpversion from string to php constant int type (#4679)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-24 16:32:49 +01:00
Tomas Votruba
a7705ed0a5
[Symplify 9] First update + switch to RuleDocGenerator (#4616)
* [composer] bump to Symplify 9

* [Symplify 9] Update phpstan rules

* bump to Symplify 9 BETA2

* update AbstractKernel from Tests to Testing namespace

* decoupling removing node trait

* remove fluent calls

* removing variadic

* [CodingStyle] Improve AnnotateThrowablesRector

* bump deps

* Make use of RuleDocGenerator

* first short

* [DocumentationGenerator] Drop deprecated package, RuleSetGenerator now handles it

* import namespace

* update docs
2020-11-16 17:50:38 +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
Abdul Malik Ikhsan
01092de6bb
[Nette 3.0] Fixes #4387 : Add ConvertAddUploadWithThirdArgumentTrueToAddMultiUploadRector (#4551)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-04 05:45:10 +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
0f2e6d407e
[DoctrineAnnotaitonGenerated] Update to doctrine/annotations 1.11 + fix static (#4479) 2020-10-25 14:43:05 +01:00
Abdul Malik Ikhsan
be06b60eac
Typo Fix: Strings::endWith() should be Strings::endsWith() (#4475)
* Typo Fix: Strings::endWith() should be Strings::endsWith()

* [rector] Typo Fix: Strings::endWith() should be Strings::endsWith()

* [cs] Typo Fix: Strings::endWith() should be Strings::endsWith()

* phpstan

* [rector] phpstan

* [cs] phpstan

* cs fix

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-23 11:23:12 +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
01514ab9a8
[SimplePhpDocParser] Add README + getParam*() helper methods (#4393) 2020-10-11 16:17:43 +02:00
Igor
35537dba84
[SOLID] Change if && to early return (#4344)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-10 18:27:13 +02:00
Tomas Votruba
3808d1b941
[Nette 3.0] Set update (#4381) 2020-10-09 22:01:37 +02:00
Tomas Votruba
8ae3868a57
[Restoration] Add RestoreFullyQualifiedNameRector (#4336)
* [Restoration] Add RestoreFullyQualifiedNameRector

* update docs

* use service aware test case for PHPStan rules

* improve FullyQualifiedNameMatcher

* cs fixes

* add return doc resolution

* composer: bump to symfony 4.4/5.1
2020-10-01 19:45:29 +00:00
Tomas Votruba
7aad4bbf2f
[PHPStan] Enable regex constant rule (#4279) 2020-09-23 11:16:40 +02:00
Tomas Votruba
52ccfc0527
[DX] move Nette FileSytem to SmartFileSystem DI (#4262)
* move Nette FileSytem to SmartFileSystem DI

* move Symfony FileSytem to SmartFileSystem

* [ci] run rector diretly, without composer wrap
2020-09-19 09:27:29 +00:00
Igor
f2ecdeb0b1
[Naming] Foreach over "data", renames to "datum" (#4221)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-15 10:23:13 +02:00
Tomas Votruba
4f1beae3fd
[DX] Fix NoAbstractMethodRule cases (#4180)
* decouple IsAbleFuncCallInterface

* decouple WithFunctionToNetteUtilsStringsRectorInterface

* decouple NodeTraversableInterface

* decouple RectorInterfaceAwareInterface

* [ci] disable markdown check to prevent user bothering
2020-09-09 09:07:14 +00:00
Tomas Votruba
7ac228c638
[CI] Add type-declaration set (#4089)
* [CI] Add type-declaration set

* [rector] [CI] Add type-declaration set

* [cs] [CI] Add type-declaration set

* skip nullable void

* add anonymous parent/interface support

* refactor MultiExceptionCatchRector to use Catch_ over integers

* type fixes

* fix unoin array type override

* remove unused test cases

* drop overcomplicated InlineValidationRulesToArrayDefinitionRector

* skip assign on var

* [rector] skip assign on var

* [cs] skip assign on var

* [rector] [cs] skip assign on var

* skip assign on var

* fixes

* [rector] fixes

* [cs] fixes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-01 17:56:30 +00:00
Tomas Votruba
41b679cb2a
[DX] Replacing arrays with objects (#4008)
* [phpstan] Add forbidden array destruct to prevent array mess

* use ArrayCallable value object

* add OpeningAndClosingSpace

* drop ConstructorInjectionToActionInjectionRector, antipattern

* use value objects

* [rector] use value objects

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-23 09:39:09 +00:00
dobryy
a3be7e03ca
[DX] Rename namespaces of Rector rules to respect node, instead of domain (#3911) 2020-08-12 11:08:59 +02:00
Tomas Votruba
7a603dde2d
[TypeDeclaration] Add nested key support (#3941)
* [TypeDeclaration] Add nested key support

* [rector] [TypeDeclaration] Add nested key support

* [cs] [TypeDeclaration] Add nested key support

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-11 11:58:03 +00:00
dobryy
411d76f9a9
[Order] Make OrderPrivateMethodsByUseRector process file in one run u… (#3889)
* [Order] Make OrderPrivateMethodsByUseRector process file in one run using while loop

* [Order] Enable rule in CI

* [rector] [Order] Enable rule in CI

* [cs] [Order] Enable rule in CI

* [Order] Use constant for number of max attempts and throw exception when exceeded.

* [rector] [Order] Use constant for number of max attempts and throw exception when exceeded.

* [cs] [Order] Use constant for number of max attempts and throw exception when exceeded.

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-05 22:45:36 +02:00
Tomas Votruba
2bd1eac705
use dev nette deps to resolve form/application types (#3879) 2020-08-03 08:51:44 +00:00
TomasVotruba
3ff6a971b7 add sponsor 2020-08-03 09:38:45 +02:00
Tomas Votruba
e35131524c
[Nette 3.0] Various rules updates (#3878)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-03 09:26:01 +02:00
Tomas Votruba
55acb3578a
[MagicDisclosure] Add SetterOnSetterMethodCallToStandaloneAssignRector (#3860)
* [MagicDisclosure] Add MethodCallOnSetterMethodCallToStandaloneAssignRector

* merge ChainMethodCallManipulator to ChainMethodCallNodeAnalyzer for better DX

* [MagicDisclosure] Add in arg defluent

* rebase
2020-08-01 11:41:16 +00:00
dobryy
3aa2fc8727
[Order] Order properties and constants with respect of complexity and position (#3826)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-07-31 22:20:45 +02:00
TomasVotruba
9488eb5d07 add debug notes 2020-07-29 03:39:48 +02:00
TomasVotruba
5859625d5d [Nette] Add TranslateClassMethodToVariadicsRector 2020-07-29 03:21:08 +02:00
TomasVotruba
94088334c7 fix missing test fixture in generator 2020-07-29 02:29:44 +02:00
TomasVotruba
1e7ad43b4d rename CreateRector command to only Create 2020-07-29 02:27:21 +02:00
TomasVotruba
f845935e4a [Nette 3.0] Get config to merge with defaults 2020-07-28 17:46:48 +02:00
TomasVotruba
d94e529f29 [Nette] Improve AddDatePickerToDateControlRector 2020-07-27 10:44:51 +02:00
TomasVotruba
63c515a834 [Nette] Load data from __construct of same class 2020-07-27 02:07:36 +02:00
TomasVotruba
86d8666438 [Nette] move quality rules to nette-code-quality directory 2020-07-26 18:48:18 +02:00
TomasVotruba
0650075005 [Nette] Add ChangeControlArrayAccessToAnnotatedControlVariableRector 2020-07-26 15:54:46 +02:00
dobryy
f37cd4cac3 [Order] Apply rule 2020-07-26 15:11:41 +02:00
TomasVotruba
e3c9add4b2 [Nette] Add dim fetch support 2020-07-26 11:54:56 +02:00
TomasVotruba
9e2b9a8859 refactor to collector pattern 2020-07-26 00:10:36 +02:00
TomasVotruba
54fa79b423 decouple OnVariableMethodCallsFormControlTypeResolver 2020-07-25 20:25:12 +02:00
TomasVotruba
7ed4cb19c4 simplify config globs 2020-07-25 20:14:28 +02:00
TomasVotruba
c50aedca5c [Nette] add support for getComponent() resolution in form array access 2020-07-25 18:24:40 +02:00