596 Commits

Author SHA1 Message Date
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
786095f328
refactoring of variable name counted (#3999)
* fix variable rename scoping

* [rector] fix variable rename scoping

* [cs] fix variable rename scoping

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-22 13:02:55 +00:00
dobryy
afa7456a05
[DX] Architecture rules respect namespace (#3983) 2020-08-20 13:56:36 +02:00
Tomas Votruba
1f61fe34f0
import repo entity (#3988)
* various fixes

* add import for generic types

* bump to newer phpstan with php-parser 4.9
2020-08-19 13:20:16 +00:00
dobryy
2e7bdca4e2
[DX] Rename namespaces respect node type (#3973) 2020-08-18 17:57:30 +02:00
Tomas Votruba
8784a81ff7
[Fluent] Add factory case (#3950) 2020-08-12 20:24:52 +02:00
Tomas Votruba
f71b242924
[Defluent] Allow DateTime to be fluent (#3947)
* ignore prefixed conflcits

* note

* skip date-time from defluencing

* drop parameter name guard, not needed anymore

* make use of addNodesAfterNode()
2020-08-12 12:32:45 +00:00
Tomas Votruba
c25cd2e178
misc (#3946)
* ignore prefixed conflcits

* note
2020-08-12 10:03:15 +00:00
Tomas Votruba
106fb1101a
service entity repository combo (#3945)
* service entity repo combo

* apply cs, add tests, fixes

* update doc parser

* [Generic] Add RemoveAnnotationRector

* add nullsafe nodes to docs

* drop AddEmptyLineBetweenCallsInPhpConfigRector, not that useful

* namespace and phpstan fix

* [ci] merge PHPStan compat to one job, no gain split attention

* [rector] [ci] merge PHPStan compat to one job, no gain split attention

* [cs] [ci] merge PHPStan compat to one job, no gain split attention

Co-authored-by: Marek Šimeček <marek.simecek@footshop.cz>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-12 09:44:34 +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
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
734d11f6c9
[SOLID] Skip func calls that change variable in ChangeReadOnlyVariableWithDefaultValueToConstantRector (#3916) 2020-08-07 00:25:25 +00:00
Tomas Votruba
2bd1eac705
use dev nette deps to resolve form/application types (#3879) 2020-08-03 08:51:44 +00: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
800abda3d2
[MagicDisclosure] Improve naming (#3862)
* add FluentChain keywords together, to make easier to find the classes

* decopule AbstractFluentChainMethodCallRector
2020-08-01 15:34:08 +00:00
Tomas Votruba
631fa9449f
[MagicDisclosure] Drop type scoping from ReturnThisRemoveRector, as always localy scope (#3858) 2020-08-01 09:06:10 +02:00
TomasVotruba
ff8d6d265b [MagicDisclosure] fluent removal improvements 2020-07-31 19:04:51 +02:00
TomasVotruba
dc14ddd0b9 [PHP 8.0] Add ChangeSwitchToMatchRector 2020-07-30 18:19:53 +02:00
TomasVotruba
fe72e003ed use constants in configs 2020-07-30 13:53:53 +02:00
TomasVotruba
b376dd8169 [SymonfyPhpConfig] Add ChangeCallByNameToConstantByClassRector 2020-07-30 01:38:09 +02:00
TomasVotruba
7c01151ec6 Move Core Rector rules to Generic namespace, to prevent mixup with Core code 2020-07-29 02:05:52 +02:00
TomasVotruba
743e9c75a3 [Nette 3.0] Add container builder extends to helpers 2020-07-29 01:21:59 +02:00
TomasVotruba
99db894192 restore types 2020-07-27 10:44:51 +02:00
TomasVotruba
d94e529f29 [Nette] Improve AddDatePickerToDateControlRector 2020-07-27 10:44:51 +02:00
TomasVotruba
86d8666438 [Nette] move quality rules to nette-code-quality directory 2020-07-26 18:48:18 +02:00
TomasVotruba
e3c9add4b2 [Nette] Add dim fetch support 2020-07-26 11:54:56 +02:00
TomasVotruba
5106475aae bump to phpstan 0.12.33 2020-07-26 11:30:43 +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
c50aedca5c [Nette] add support for getComponent() resolution in form array access 2020-07-25 18:24:40 +02:00
TomasVotruba
6872ad1f07 add support for connection with method call 2020-07-25 00:55:09 +02:00
TomasVotruba
dc60a96ff6 [Nette] add support for new instance type 2020-07-24 18:32:31 +02:00
TomasVotruba
adcaf173d3 add custom control by method name 2020-07-24 16:02:09 +02:00
TomasVotruba
8d556bf2fc update docs with PHP snippets 2020-07-24 13:49:10 +02:00
TomasVotruba
78a0331708 [SymfonyPhpConfig] Add AddEmptyLineBetweenCallsInPhpConfigRector 2020-07-22 23:50:58 +02:00
TomasVotruba
7b87ddb2ef phpstan: prefer parser variable over symfony 2020-07-22 22:18:32 +02:00
TomasVotruba
d4f6c497a7 [Nette] Add form dim access to standalone node control 2020-07-22 21:38:34 +02:00
TomasVotruba
b9a925a5cf re-use VariableRenamer in RenameVariableToMatchGetMethodNameRector 2020-07-19 13:29:18 +02:00
TomasVotruba
bc0d9b3675 from YAML to PHP sets 2020-07-18 19:56:27 +02:00
Jonathan Goode
cdb3e889cf Create new TernaryConditionVariableAssignmentRector
Ignore false positives in PHPStan
2020-07-16 16:40:04 +01:00
TomasVotruba
08823bb449 skip self-class rename in RenameMethodRector 2020-07-14 00:22:31 +02:00
TomasVotruba
d42f34d39e inline single-used classes 2020-07-13 14:58:11 +02:00
TomasVotruba
9a5a8fe081 [Utils] Add RequireStringArgumentInMethodCallRule 2020-07-13 14:53:00 +02:00
TomasVotruba
2023d41061 fix import of already existing param/var/return type or class annotation 2020-07-12 19:38:46 +02:00
TomasVotruba
a619753f73 improve UnusedForeachValueToArrayKeysRector to work with array foreach values 2020-07-07 22:13:09 +02:00
TomasVotruba
3c3c3a9530 remove func call from methods calls 2020-07-06 01:59:41 +02:00
TomasVotruba
836200068b improve template annotation 2020-07-05 21:16:17 +02:00
TomasVotruba
8776345920 decouple createConcat() method 2020-07-04 18:01:55 +02:00
TomasVotruba
3353bc2ed4 update Fixture splitter class name 2020-07-04 17:23:50 +02:00
TomasVotruba
52acc54005 merge PropertyNaming to one class 2020-07-01 23:42:23 +02:00