3046 Commits

Author SHA1 Message Date
TomasVotruba
ded6e13996 fix cs 2020-01-12 22:42:38 +01:00
TomasVotruba
efabe2d986 move usage from BetterPhpDocParser ast nodes to AttributeAwarePhpDoc 2020-01-12 21:42:20 +01:00
TomasVotruba
8d00bd8e02 generate AttributeAware nodes + factories 2020-01-12 21:42:20 +01:00
TomasVotruba
464eb22030 Add PHPStanAttributeTypeSyncer 2020-01-12 21:42:19 +01:00
TomasVotruba
3fec96049b Add nested array const type 2020-01-12 00:49:54 +01:00
TomasVotruba
4358dbc1a1 Extend AddDoesNotPerformAssertionToNonAssertingTestRector by catching more test messages 2020-01-11 23:56:53 +01:00
Tomas Votruba
8876a62deb
Merge pull request #2640 from gnutix/AddDoesNotPerformAssertionToNonAssertingTestRector/prophecy-failing-test
[AddDoesNotPerformAssertionToNonAssertingTestRector] Add failing test for Prophecy assertions.
2020-01-11 23:21:09 +01:00
Tomas Votruba
57b4359ce9
[CountOnNullRector] fix Rector applying on properties with phpd… (#2637)
[CountOnNullRector] fix Rector applying on properties with phpdocs array
2020-01-11 23:20:35 +01:00
TomasVotruba
fa12a080e4 [CakePHP] Add ImplicitShortClassNameUseStatementRector 2020-01-11 22:14:25 +01:00
TomasVotruba
3050843a49 [CakePHP 3.0] Add AppUsesStaticCallToUseStatementRector 2020-01-11 22:14:25 +01:00
Dorian Villet
58ac2cd797 [AddDoesNotPerformAssertionToNonAssertingTestRector] Add failing test for Prophecy assertions. 2020-01-11 14:48:17 +01:00
Tomas Votruba
413a348e00
[ForeachItemsAssignToEmptyArrayToAssignRector] apply on code it… (#2587)
[ForeachItemsAssignToEmptyArrayToAssignRector] apply on code it should not
2020-01-11 12:34:24 +01:00
Dorian Villet
f9b8a4102d Rename fixtures files. 2020-01-11 12:29:52 +01:00
Tomas Votruba
3f805d93c3
fix pattern miss matching (#2639)
fix pattern miss matching
2020-01-11 11:10:55 +01:00
Tomas Votruba
2e83fe78c1
[Php70] add a rector to pass only variables as arguments by ref… (#2546)
[Php70] add a rector to pass only variables as arguments by reference
2020-01-11 11:08:56 +01:00
TomasVotruba
16f32a05c5 fix pattern miss matching 2020-01-11 10:52:49 +01:00
Tomas Votruba
9cac83e364
[AddDoesNotPerformAssertionToNonAssertingTestRector] fix skippi… (#2636)
[AddDoesNotPerformAssertionToNonAssertingTestRector] fix skipping if annotation already exists (fixes infinite loop too)
2020-01-11 10:32:28 +01:00
TomasVotruba
23c0fb1d2a [CodingStyle] Prevent adding non-namespaced imports to non-namespaced class 2020-01-11 09:54:10 +01:00
Dorian Villet
0a64874194 Fix it. 2020-01-11 01:56:26 +01:00
Dorian Villet
28fb2aa3c3 Add broken tests for ForeachItemsAssignToEmptyArrayToAssignRector. 2020-01-11 01:47:14 +01:00
Dorian Villet
2108efd37e [CountOnNullRector] fix Rector applying on properties with phpdocs array. 2020-01-11 01:44:42 +01:00
Dorian Villet
7eeee4f44e AddDoesNotPerformAssertionToNonAssertingTestRector: fix skipping if annotation already exists. Fixes #2634. 2020-01-11 01:04:44 +01:00
Dorian Villet
0cd4d89827 Add failing test for AddArrayReturnDocTypeRector (should skip adding phpdoc if the parent defines it). 2020-01-10 17:01:57 +01:00
Dorian Villet
56c9d312ee Fix it. 2020-01-10 16:53:57 +01:00
Dorian Villet
e073b9ac01 Add failing test case for mixed[] (return array). 2020-01-10 16:49:03 +01:00
Dorian Villet
9874e80e7d Simplify the test case method for one that better illustrate the issue. 2020-01-10 16:42:01 +01:00
Dorian Villet
426dd6ab4b Fix CS. 2020-01-10 16:29:33 +01:00
Dorian Villet
8facc752a4 Fix AddArrayReturnDocTypeRector on @return iterable<mixed>. 2020-01-10 16:22:14 +01:00
Lctrs
85e73f9827 [Php70] add a rector to pass only variables as arguments by reference 2020-01-10 15:37:08 +01:00
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