1018 Commits

Author SHA1 Message Date
Abdul Malik Ikhsan
9465173276
Fixes #3930 : TypedPropertyRector should not remove DocBlock comment when it specifies the values contained in an array (#4102) 2020-09-02 14:01:45 +02:00
Abdul Malik Ikhsan
108c6fd52f
Typo fix: NESTED_STIRNGS to NESTED_STRINGS (#4101)
Signed-off-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
2020-09-02 11:56:12 +02:00
Chun-Sheng, Li
471e820d4e
Add self call fixtures for AssertResourceToClosed (#4103) 2020-09-02 11:53:55 +02:00
Tomas Votruba
83e2db04d8
[CodingStyle] Skip annotation var on already set mixed[] array (#4100)
* [CodingStyle] Skip big constants for var

* skip mixed[] var constant, on purpose

* [rector] skip mixed[] var constant, on purpose

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-01 20:04:49 +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
Leonardo Losoviz
02e703b9b9
Configurable downgrade (#4099) 2020-09-01 18:12:01 +02:00
Chun-Sheng, Li
020c7b82b0
[PHPUnit] Add self call fixtures for AssertEqualsToSame rule (#4098) 2020-09-01 18:11:30 +02:00
Abdul Malik Ikhsan
3d2a35d63e
Fixes #4013 ConsoleExecuteReturnIntRector ignores already type casted variable (#4095)
* #4013: Don't force type hint if already forced.

* Fixes #4013 ConsoleExecuteReturnIntRector ignores already type casted variable

Signed-off-by: Abdul Malik Ikhsan <samsonasik@gmail.com>

* remove no expected change already casted variable fixture

Signed-off-by: Abdul Malik Ikhsan <samsonasik@gmail.com>

* remove unneded $hasReturn fill on check node->expr instanceof Int_

Co-authored-by: Aerendir <hello@aerendir.me>
2020-09-01 15:57:00 +02:00
Alister Bulman
9fb4ff339d
Replace types with container access from fe72e003e. fixes #4090 (#4092) 2020-09-01 11:37:01 +02:00
Tomas Votruba
7256dbe667
symplify fixes (#4088)
* notify param/return doc changes

* prevent array doc override
2020-08-31 20:32:33 +00:00
Tomas Votruba
b281fb1260
StaticCall to MethodCall (#4085)
* drop MessageAsArrayRector, as only rule in guzzle

* [Transform] Move StaticCallToMethodCallRector to Transform

* merge FacadeStaticCallToConstructorInjectionRector to StaticCallToMethodCallRector

* add ArrayArgumentToDataProvider

* [Transform] Move PropertyAssignToMethodCallRector to Transform
2020-08-31 08:48:14 +00:00
Tomas Votruba
082f1c6294
[Transform] Move StaticCallToMethodCallRector to Transform (#4084)
* drop MessageAsArrayRector, as only rule in guzzle

* [Transform] Move StaticCallToMethodCallRector to Transform
2020-08-31 00:26:25 +00:00
Tomas Votruba
df6e083324
drop MessageAsArrayRector, as only rule in guzzle (#4083) 2020-08-31 00:16:12 +00:00
Tomas Votruba
042f08f71b
Drop YAML config support (#4081)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 23:29:39 +02:00
Tomas Votruba
3a7d197b34
update FuncNameToStaticCallName to FuncCallToStaticCall (#4080) 2020-08-30 20:12:49 +00:00
dobryy
4e91b78c7b
[Naming] Rename the rule to make it correspond with what rule does (#4076)
* [Naming] Rename the rule to make it correspond with what rule does

* [Naming] Update doc
2020-08-30 21:01:33 +02:00
Tomas Votruba
3d03ec4beb
Removing single-rule elastic package set, merge Decomplex set to CodingStyle, merge FrameworkMigration to NetteToSymfony (#4079)
* drop elasticsearch-dsl50, used for single change, unmaintained

* [CodingStyleAdvanced] Move UseMessageVariableForSprintfInSymfonyStyleRector from single-rule set Decomplex to CodingStyleAdvanced

* merge FrameworkMigration with 1 class to NetteToSymfony

* [Transform] Move ServiceGetterToConstructorInjectionRector to Transform set

* [Transform] Move ReplaceParentCallByPropertyCallRector to Transform package

* [Transform] Move StaticCallToFunctionRector to Transform

* update docs

* [Transform] Move NewToStaticCallRector to Transform
2020-08-30 18:48:37 +00:00
Tomas Votruba
4584359f96
[Transform] Move FuncCallToMethodCallRector to Transform category (#4077) 2020-08-30 19:59:59 +02:00
Tomas Votruba
989c3f4168
[Transform] Move HelperFunctionToConstructorInjectionRector to Transform package (#4074)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 18:55:16 +02:00
Tomas Votruba
e698e83687
[Transform] Decouple new set that changes nodes (#4073)
* [Transform] Move PropertyToMethodRector from Generic to Transform category

* move AbstractIsAbleRector to Generic

* [Transform] Move MethodCallToPropertyFetchRector from Generic to Transform

* [Transform] Move MethodCallToStaticCallRector from Generic to Transform

* [Transform] Move MethodCallToAnotherMethodCallWithArgumentsRector from Generic to Transform
2020-08-30 15:47:36 +02:00
geryguilbon
5d521b4d9f
BUGFIX: Correction of parsing error while executing command 'composer complete-check' (#4072) 2020-08-30 13:12:21 +00:00
Tomas Votruba
2a6df65a5b
Fix static class call (#4068)
* [CodingStyle] Add static call case to alias removal

* handle static call class alias remove

* [rector] handle static call class alias remove

* [cs] handle static call class alias remove

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 12:58:34 +00:00
Tomas Votruba
3226d2d36c
naming (#4070) 2020-08-30 14:56:39 +02:00
Tomas Votruba
ff6d6571e6
[Order] Add abstract class, check for changed order and move category to Class_, to prevent minus types (#4069)
* [Order] report applied rule only on change

* add AbstractConstantPropertyMethodOrderRector, use explicit Class_ and Trait_ over minus

* update docs

* add PropertyNameRankAndPosition value object

* static fixes

* add ClassMethodRankeable and RankeableInterface, to get rid of arrays

* add PropertyRankeable

* add ClassConstRankeable

* add sortByRanksAndGetNames()

* [rector] add sortByRanksAndGetNames()

* [cs] add sortByRanksAndGetNames()

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 12:45:03 +00:00
Tomas Votruba
55c45b8c2b
fix return void (#4067) 2020-08-30 07:55:32 +00:00
Tomas Votruba
7312185dc3
fix return type for yield from (#4066) 2020-08-30 06:57:43 +00:00
Tomas Votruba
f8b485305f
Add multiple annotation support on class (#4064)
* add test case for #3230

* position

* add support for multi doc annotations

* [rector] add support for multi doc annotations

* [cs] add support for multi doc annotations

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-29 23:12:20 +00:00
Tomas Votruba
351e59fa3b
Fix array type (#4058)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-29 16:20:27 +02:00
Tomas Votruba
41a9b63c6f
fix ci (#4057) 2020-08-29 11:03:40 +02:00
dobryy
d40309963c
[Type Declaration] Create new unit test for ArrayTypeMapper with fixes (#4054)
* Create new unit test for ArrayTypeMapper with fixes

* Fix typo in method name that breaks all tests

* Remove skip too many fixtures to implement the fix for these fixtures as a next PR.
2020-08-29 10:41:19 +02:00
Tomas Votruba
190d7cf616
update ecs (#4048)
* remove array return

* misc
2020-08-28 23:10:00 +02:00
Dmytro Naumenko
41d5f5567f
[TryCatch] Try/Catch with filled Finally can not be dead (#4053) 2020-08-28 23:08:45 +02:00
Dmytro Naumenko
12691991bb
[Code Quality] If the whole concatenated string is longer than 120 chars, skip it (#4052) 2020-08-28 18:08:25 +02:00
Tom Pavelec
36b24b2bfc
fix: swapped naming of camel and pascal cases (#4047) 2020-08-28 18:07:15 +02:00
Chun-Sheng, Li
0a589f9f68
Add AssertResourceToClosedResourceRector rule (#4037)
* Add AssertResourceToClosedResourceRector rule

* Using @source and @see comment annotations
2020-08-28 07:01:40 +02:00
dobryy
f6fba29169
[Type Declaration] The smallest possible fixture fixed ReturnUuid (#4044)
* the smallest possible fixture fixed

* fix default key integer

Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-08-28 07:00:03 +02:00
dobryy
5b4797af85
[Type Declaration] Fix unwrapping of multiple union types (#4043) 2020-08-27 21:05:00 +02:00
Tom Pavelec
dffcae0c82
Fixed some edge cases of creating constant name from value (#4041) 2020-08-27 17:08:49 +02:00
Tomas Votruba
650dcc8ef0
beware reference (#4039) 2020-08-27 12:19:22 +02:00
Dmytro Naumenko
60aa571c71
Fixed RemoveMissingCompactVariableRector to handle array arguments properly (#4023) 2020-08-27 11:00:46 +02:00
Dmytro Naumenko
7d56c0aad9
Fix variable name resolving for static method calls (#4021)
* Fix variable name resolving for static method calls

* Enhanced error reporting
2020-08-27 10:59:10 +02:00
Tomas Votruba
dbda0beee8
[DX] Last value objects (#4035)
* [DX] Add CallToFluent

* [DX] Add ArrayToFluentCall

* [DX] Add FactoryMethod
2020-08-26 14:25:28 +00:00
Tomas Votruba
dfe158e2da
[DX] Various value objects added (#4034)
* [DX] Add TypeToStaticCall

* [DX] Add ClassConstantRename

* [DX] Add IssetUnsetToMethodCall

* [DX] Add MethodToYield

* drop unamtained shopware sets

* [DX] Add RenamedAnnotationInType

* [DX] Add MethodCallWrap

* [DX] Add RenamedProperty

* [DX] Add StringToClassConstant

* [DX] Add ArgumentSwap

* simplify rename function rector

* [DX] Add RemovedFunctionArgument

* [DX] Add MethodCallToService

* [DX] Add UnprefixedMethodToGetSet

* [DX] Add PseudoNamespaceToNamespaceRector

* [DX] Add FunctionArgumentSwap

* [DX] Add StaticCallToFunction

* [DX] Add ParentCallToProperty

* [DX] Add ParentDependency

* [DX] Add CallWithParamRename

* [DX] Added MethodCallRenameWithAddedArguments

* [DX] Add PropertyToMethodCall

* [DX] Add PropertyToMethodCall

* [rector] [DX] Add PropertyToMethodCall

* [cs] [DX] Add PropertyToMethodCall

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-26 10:54:53 +00:00
Tomas Votruba
b4db31a2ae
[DX] Add ReplacedArgument (#4030) 2020-08-26 00:21:41 +02:00
Tomas Votruba
5cad696c95
[DX] Add AddedArgument (#4029) 2020-08-25 23:25:00 +02:00
Tomas Votruba
c2cfdaeacd
[DX] Add MethodVisibility value object (#4028) 2020-08-25 21:19:12 +02:00
Tomas Votruba
4553ae9579
[DX] Add TypeMethodWrap, RemovedArgument (#4026)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-25 21:05:58 +02:00
Tomas Votruba
44d3ec8b7a
[DX] Add MethodReturnType value object (#4020)
* re-enable rule

* add MethodReturnType value object

* drop sylius deprecated sets, as not maintained for last 2 years
2020-08-25 18:34:49 +00:00
Dmytro Naumenko
a15d2f8ccc
Fixed ClassMethodPropertyFetchManipulator to omit property assign by method call (#4022) 2020-08-25 18:17:43 +02:00
Tomas Votruba
35f61c64b6
[objectize] moving parameter typehint to objects (#4019)
* moving parameter typehint to objects

* rename constnats

* add support for nested configs

* switch to param type value object

* [rector] switch to param type value object

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-25 02:21:00 +02:00