Tomas Votruba
8eafe7a6ab
Merge pull request #2618 from Jaapze/master
...
More reliable way getting first stmt item
2020-01-09 13:18:41 +01:00
Jaapze
13ed8437b9
Check if $node->stmts has a null value
2020-01-09 12:59:18 +01:00
Jaapze
a1754b38ce
More reliable way getting first stmt item
...
The key values are not reliable, this problem is caused by unsetting the values in the stmts array of a node without resetting them. It's not only in this rector file and might need a bigger fix, but this one was bugging me whole day.
2020-01-09 11:41:58 +01:00
Tomas Votruba
8760d0a2c1
Add support for PHPStan 0.12+ @template annotation. ( #2613 )
...
Add support for PHPStan 0.12+ @template annotation.
2020-01-08 23:36:34 +01:00
Dorian Villet
44278b4957
Fix PHPStan @return class-string<T>.
2020-01-08 22:40:52 +01:00
Dorian Villet
88519c0cd9
Add support for PHPStan 0.12+ @template annotation.
2020-01-08 21:28:25 +01:00
TomasVotruba
cdf2fb35a4
Fix non-direct parent foreach in ForeachItemsAssignToEmptyArrayToAssignRector
2020-01-08 15:03:09 +01:00
TomasVotruba
62c3dcf743
[CodeQuality] Fix nested foreach case in ForeachItemsAssignToEmptyArrayToAssignRector
2020-01-08 14:36:53 +01:00
Jaapze
25281adc5a
More readable solution for getting last stmt item
2020-01-08 13:34:36 +01:00
Jaapze
210a685761
more reliable way getting last stmt
...
This is a more reliable way of getting the last array element, especially when certain keys are reset of the stmt array.
2020-01-08 12:48:11 +01:00
Tomas Votruba
21a37fd7b3
[DoctrineGemoToKnplabs] Add LoggableBehaviorRector ( #2601 )
...
[DoctrineGemoToKnplabs] Add LoggableBehaviorRector
2020-01-07 14:41:37 +01:00
TomasVotruba
28b8649939
[DoctrineGemoToKnplabs] Add LoggableBehaviorRector
2020-01-07 14:29:54 +01:00
Tomas Votruba
5ce4357b89
[Symfony] fix process error of controller with Internationalize… ( #2600 )
...
[Symfony] fix process error of controller with Internationalized routing
2020-01-07 13:50:05 +01:00
Andras Ratz
8d62962d61
fix process error of controller with Internationalized routing
2020-01-07 13:37:10 +01:00
TomasVotruba
fdf686cf04
[DoctrineGemoToKnplabs] Add BlameableBehaviorRector
2020-01-07 13:36:55 +01:00
Tomas Votruba
44b84bdad3
Skip ReturnTypeDeclarationRector when the type is already defin… ( #2598 )
...
Skip ReturnTypeDeclarationRector when the type is already defined as \Traversable
2020-01-07 12:53:36 +01:00
Dorian Villet
0a149c08bb
Skip ReturnTypeDeclarationRector when the type is already defined as \Traversable.
2020-01-07 12:29:55 +01:00
Dorian Villet
7762ba3a17
Fix running AddArrayReturnDocTypeRector on already existing return type annotation for empty arrays.
2020-01-07 09:41:27 +01:00
TomasVotruba
2dc315c81c
[DoctrineGedmoToKnpLabs] Add SoftDeletableBehaviorRector
2020-01-07 01:54:50 +01:00
TomasVotruba
5e86892c5a
fix cs
2020-01-07 00:18:51 +01:00
Tomas Votruba
b6aea6e469
Don't return void when function contains empty return statement ( #2572 )
...
Don't return void when function contains empty return statement
2020-01-06 22:01:39 +01:00
Dorian Villet
b4e30172c8
Fix PHPStan 0.12+ @implements and @extends class annotations.
2020-01-06 19:35:11 +01:00
Witold Wasiczko
fecee1baf2
Merge remote-tracking branch 'rectorphp/master' into return-void-when-void-return
2020-01-06 18:35:29 +01:00
Witold Wasiczko
789973469c
Move fixture to another method
2020-01-06 16:22:37 +01:00
TomasVotruba
205ff17ec6
fix nette compat
2020-01-06 16:05:40 +01:00
Tomas Votruba
4c50c4a11e
avoid direct container in the code ( #2582 )
...
avoid direct container in the code
2020-01-06 13:55:47 +01:00
TomasVotruba
a1793dca03
compare type and content of types
2020-01-06 13:35:21 +01:00
TomasVotruba
1ef7785d55
avoid direct container in the code
2020-01-06 13:27:13 +01:00
Tomas Votruba
befc972d5c
[Polyfill] Add UnwrapFutureCompatibleIfRector ( #2569 )
...
[Polyfill] Add UnwrapFutureCompatibleIfRector
2020-01-06 13:15:33 +01:00
TomasVotruba
a37a7d1dad
[Polyfill] Add UnwrapFutureCompatibleIfRector
2020-01-06 13:00:26 +01:00
Ondrej Mirtes
f4862b99b0
Compare types by description
2020-01-06 09:57:24 +01:00
Ondrej Mirtes
b77fa521c3
Compatibility with PHPStan 0.12.4
2020-01-06 09:57:24 +01:00
TomasVotruba
a38d61f00c
[SOLID] Add ChangeIfElseValueAssignToEarlyReturnRector
2020-01-06 01:42:15 +01:00
TomasVotruba
3159da6712
use explicit null in yaml
2020-01-05 20:00:32 +01:00
Witold Wasiczko
f610206257
Generate no return when empty return statement
2020-01-05 19:33:35 +01:00
Witold Wasiczko
e15e6b0351
Revert visibility
2020-01-05 19:18:58 +01:00
Witold Wasiczko
4d3437674f
Test case: rector generates return for void function when void has return statement
2020-01-05 19:16:06 +01:00
TomasVotruba
e12544ae5f
improve various tests
2020-01-05 19:05:33 +01:00
TomasVotruba
6cf187d37a
[SOLID] Add ChangeNestedIfsToEarlyReturnRector
2020-01-05 18:20:13 +01:00
Tomas Votruba
743e27d661
[DeadCode] Add RemoveUnusedClassesRector ( #2565 )
...
[DeadCode] Add RemoveUnusedClassesRector
2020-01-05 00:19:38 +01:00
Tomas Votruba
6e31e37c42
fix ChangeArrayPushToArrayAssignRector for multiple items ( #2566 )
...
fix ChangeArrayPushToArrayAssignRector for multiple items
2020-01-05 00:17:47 +01:00
TomasVotruba
6be83258a6
make nested chain call remove configurable
2020-01-05 00:16:49 +01:00
TomasVotruba
90b7d2991f
fix ChangeArrayPushToArrayAssignRector for multiple items
2020-01-05 00:14:23 +01:00
TomasVotruba
3b82be51c0
remove unused classes
2020-01-05 00:06:18 +01:00
TomasVotruba
9e67d30e84
[DeadCode] Add RemoveUnusedClassesRector
2020-01-05 00:03:42 +01:00
TomasVotruba
9e157a04f3
prevent variable scope changing
2020-01-04 16:03:30 +01:00
Tomas Votruba
430f63188f
Merge pull request #2562 from rectorphp/edges
...
Prevent variable name override
2020-01-04 15:31:44 +01:00
TomasVotruba
bb7995b83b
preven variable name override
2020-01-04 15:30:53 +01:00
TomasVotruba
44e96deeff
[CodingQuality] Add ForeachItemsAssignToEmptyArrayToAssignRector
2020-01-04 15:15:46 +01:00
TomasVotruba
7f99a934d4
[CodeQuality] Add ForRepeatedCountToOwnVariableRector
2020-01-04 14:08:43 +01:00