51 Commits

Author SHA1 Message Date
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
41a9b63c6f
fix ci (#4057) 2020-08-29 11:03:40 +02: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
Tomas Votruba
9164d46a3b
[Naming] Add MakeGetterClassMethodNameStartWithGetRector (#4003)
* [Naming] Add MakeGetterClassMethodNameStartWithGetRector

* [rector] [Naming] Add MakeGetterClassMethodNameStartWithGetRector

* [cs] [Naming] Add MakeGetterClassMethodNameStartWithGetRector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-22 15:46:09 +00:00
Tomas Votruba
33d992497a
[Doctrine] Add constructor getRepository to service (#3954) 2020-08-13 01:04:23 +02:00
Tomas Votruba
1c4b510513
PHPStan: require iterable types (#3936)
* phpstan: require iterable types

* add link on relative path and line

* fix missing class type

* typed array in Rector code + add data provide support resolver

* remove duplicated set

* drop unused yaml ecs config

* add out-of-the-box directory for 3rd party packages

* static fixes

* [rector] static fixes

* [cs] static fixes

* [rector] [cs] static fixes

* generic types

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-11 10:59:04 +00:00
Tomas Votruba
e7429d96a4
make use of constant (#3875) 2020-08-02 13:17:33 +00:00
Tomas Votruba
76b4ab7586
[Defluent] New set + various improvements (#3853)
* remove dead-else branch

* add defluent set

* fix type to match

* use constants over strings

* fixup! use constants over strings

* Add fluent as arg support to DefluentMethodCallRector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-07-31 23:08:16 +00:00
TomasVotruba
fe72e003ed use constants in configs 2020-07-30 13:53:53 +02:00
dobryy
f37cd4cac3 [Order] Apply rule 2020-07-26 15:11:41 +02:00
TomasVotruba
7ed4cb19c4 simplify config globs 2020-07-25 20:14:28 +02:00
TomasVotruba
0188d802d2 use SmartFileSystem over Nette FileSystem 2020-07-24 14:39:10 +02:00
TomasVotruba
c1e1053d1c correct names manually back to desired state 2020-07-19 21:32:18 +02:00
TomasVotruba
c2c1066374 [rector] apply on rules 2020-07-19 20:52:42 +02:00
TomasVotruba
0944b75f7e correct namespace in configs 2020-07-18 11:58:17 +02:00
TomasVotruba
f8c50ee885 switch config.yaml to config.php 2020-07-16 13:45:20 +02:00
TomasVotruba
0c816d60f8 [config] switch rules config from YAML to PHP 2020-07-16 12:48:54 +02:00
TomasVotruba
ee291d1fdc use strings over ::class in type detection, as they ge tprifexed by phar builder 2020-07-12 16:38:04 +02:00
TomasVotruba
3c3c3a9530 remove func call from methods calls 2020-07-06 01:59:41 +02:00
TomasVotruba
c08d874107 make use PhpDocTrait 2020-06-30 02:27:55 +02:00
TomasVotruba
a8a6e7bcad rename file to fileInfo 2020-06-30 01:45:05 +02:00
TomasVotruba
0cb82c2a6f apply new Naming_ 2020-06-30 00:57:38 +02:00
TomasVotruba
7f49658112 change test(string ) to test(SmartFileInfo ) in tests 2020-06-25 20:02:36 +02:00
TomasVotruba
c504062ec2 add typed property if on PHP 7.4 2020-06-24 15:09:50 +02:00
TomasVotruba
b5f0129c84 complete missing code samples 2020-06-16 16:20:17 +02:00
TomasVotruba
9922ba600b make Rector description required for dumping documentation 2020-06-16 13:47:57 +02:00
TomasVotruba
420fdef26f [Sensio] Add @route migration to Symfony 2020-06-06 15:07:44 +02:00
TomasVotruba
68170d3ba5 inline UuidInterface class 2020-06-04 16:22:11 +02:00
TomasVotruba
f0a67edb7e [Nette Kdyby] Add ReplaceEventManagerWithEventSubscriberRector 2020-05-29 01:36:25 +02:00
TomasVotruba
0a255f7758 refactor finish extension to event subscriber 2020-05-26 14:59:45 +02:00
TomasVotruba
13814e0321 decopule Extension package 2020-05-26 14:09:42 +02:00
TomasVotruba
b0bd524e53 apply constant decouple 2020-05-06 23:40:31 +02:00
TomasVotruba
94160332e1 [utils] improve SeeAnnotationToTestRule to check reference to test case class 2020-05-05 22:09:56 +02:00
TomasVotruba
ccd2760a77 make use of getProperty() method 2020-05-05 16:51:12 +02:00
TomasVotruba
e59db0f400 add first multi type node factory - MultiPhpDocNodeFactory 2020-04-30 13:18:11 +02:00
TomasVotruba
5fb73c2309 TagValueNode refactoring 2020-04-29 12:54:26 +02:00
TomasVotruba
1bf62ac1c7 [cs] sort private methods by call order and property by complexity 2020-04-26 02:57:47 +02:00
TomasVotruba
a5c8afa805 add generic quote support for tag value nodes 2020-04-22 12:25:22 +02:00
TomasVotruba
0939387553 use getProperty() 2020-04-19 23:27:37 +02:00
TomasVotruba
192c4464ec various improvements 2020-04-19 23:17:01 +02:00
Jeroen Thora
e57c72499c Add extra allowed interface to EntityAliasToClassConstantReferenceRector 2020-04-10 13:03:04 +02:00
Jeroen Thora
4e5c09fbb6 Make sure doctrine alias rector works in symfony controllers 2020-04-07 13:31:41 +02:00
TomasVotruba
4c4e56b168 make use of isStaticCallNamed() 2020-04-05 00:52:49 +02:00
TomasVotruba
626287ec76 apply privatization 2020-03-29 00:06:05 +01:00
TomasVotruba
903483bf96 decouple ClassInsertManipulator 2020-02-29 22:10:06 +01:00
TomasVotruba
7eb2ac0e36 decopule class dependency manipulator methods 2020-02-29 21:22:00 +01:00
TomasVotruba
d074d5169a Fix FinalizeClassesWithoutChildrenRector for embedable 2020-02-23 23:25:58 +01:00
TomasVotruba
cef900323f add add ShortNameAwareTagInterface 2020-02-23 16:14:23 +01:00
TomasVotruba
bc24bb12ff prevent getName() on StaticCall or MethodCall 2020-02-21 16:41:33 +01:00
TomasVotruba
1ad8f08ccd [SOLID] Add ChangeReadOnlyVariableWithDefaultValueToConstantRector 2020-02-18 23:59:07 +01:00