3487 Commits

Author SHA1 Message Date
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
dobryy
29d44284cc
[Order] Order class methods by visibility (#3923)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-07 18:23:40 +02:00
Tomas Votruba
ec28719c6c
make use of NodeConnectingVisitor + improve generate Rector docs (#3925) 2020-08-07 11:30:05 +02:00
Tomas Votruba
734d11f6c9
[SOLID] Skip func calls that change variable in ChangeReadOnlyVariableWithDefaultValueToConstantRector (#3916) 2020-08-07 00:25:25 +00:00
Zing
c60fad6976
Fix set path was not found (#3918) 2020-08-06 09:11:41 +02:00
dobryy
411d76f9a9
[Order] Make OrderPrivateMethodsByUseRector process file in one run u… (#3889)
* [Order] Make OrderPrivateMethodsByUseRector process file in one run using while loop

* [Order] Enable rule in CI

* [rector] [Order] Enable rule in CI

* [cs] [Order] Enable rule in CI

* [Order] Use constant for number of max attempts and throw exception when exceeded.

* [rector] [Order] Use constant for number of max attempts and throw exception when exceeded.

* [cs] [Order] Use constant for number of max attempts and throw exception when exceeded.

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-05 22:45:36 +02:00
dobryy
7baec08138
Check that Recipe node types are imported (#3904)
* Check that Recipe node types are imported

* [rector] Check that Recipe node types are imported

* [cs] Check that Recipe node types are imported

* Update packages/rector-generator/src/ValueObject/Configuration.php

Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>

* Use `is_a` instead of `class_exists` in order to also check whether node type implements \PhpParser\Node interface

Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-08-04 22:34:24 +00:00
Tomas Votruba
fa9f618866
skip configure unless in tests (#3907) 2020-08-04 19:12:46 +00:00
Tomas Votruba
7212366606
[Naming] Decouple RenameParamToMatchTypeRector (#3906)
* [Naming] Decouple RenameParamToMatchTypeRector

* remove overrlaping useless test fixtures

* [rector] remove overrlaping useless test fixtures

* [cs] remove overrlaping useless test fixtures

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-04 18:30:31 +00:00
Tomas Votruba
09f67341ee
Add set-path constant support (#3886) 2020-08-03 21:14:41 +02:00
Tomas Votruba
b61d22d56e
[Naming] Allow uuid to have name id (#3883)
* [Naming] Allow uuid to have name id

* add REPOSITORY_AS_SERVICE set

* [rector] add REPOSITORY_AS_SERVICE set

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-03 17:52:40 +00:00
Tomas Votruba
e7429d96a4
make use of constant (#3875) 2020-08-02 13:17:33 +00:00
Tomas Votruba
ee957111c4
fix import slash (#3871) 2020-08-02 10:04:46 +00:00
Tomas Votruba
fa2caf77ed
[NetteCodeQuality] Add ArrayAccessSetControlToAddComponentMethodCallRector (#3867) 2020-08-02 00:18:40 +02:00
Tomas Votruba
a84528af9e
[Docs] Show constants over values (#3866)
* [docs] decouple RectorCodeSamplePrinter

* decopule printers

* make sure constnat are used in docs

* update docs
2020-08-01 20:55:31 +00: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
4624778cb0
[MagicDisclosure] Fluent refactoring (#3861)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-01 16:57:37 +02:00
Tomas Votruba
55acb3578a
[MagicDisclosure] Add SetterOnSetterMethodCallToStandaloneAssignRector (#3860)
* [MagicDisclosure] Add MethodCallOnSetterMethodCallToStandaloneAssignRector

* merge ChainMethodCallManipulator to ChainMethodCallNodeAnalyzer for better DX

* [MagicDisclosure] Add in arg defluent

* rebase
2020-08-01 11:41:16 +00:00
Zing
578bfaf38c
[RectorGenerator] Fix trailing comma in function calls error in php 7.2 (#3857) 2020-08-01 09:05:05 +02: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
c463b08d53 fix inner type override 2020-07-31 23:41:41 +02:00
dobryy
3aa2fc8727
[Order] Order properties and constants with respect of complexity and position (#3826)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-07-31 22:20:45 +02:00
kodiakhq[bot]
e27f70d103
Merge pull request #3831 from rectorphp/fix-call
decouple testing tools
2020-07-30 16:42:09 +00:00
TomasVotruba
0647a0e922 update docs to use call() 2020-07-30 17:42:01 +02:00
TomasVotruba
2291d5540a decopule testing tools 2020-07-30 16:31:57 +02:00
TomasVotruba
2ad011673f [PHP 7.0] Fix variable name on static call 2020-07-30 15:53:21 +02:00
TomasVotruba
2bdb38b602 add suffix to prevent phpunit autoload 2020-07-30 15:27:39 +02:00
TomasVotruba
fe72e003ed use constants in configs 2020-07-30 13:53:53 +02:00
TomasVotruba
135c6cd110 make fixture naming unique 2020-07-29 21:52:18 +02:00
TomasVotruba
2741893bbf [RectorGenerator] Refactoring to testable code 2020-07-29 20:50:31 +02:00
TomasVotruba
5859625d5d [Nette] Add TranslateClassMethodToVariadicsRector 2020-07-29 03:21:08 +02:00
TomasVotruba
94088334c7 fix missing test fixture in generator 2020-07-29 02:29:44 +02:00
TomasVotruba
de5026fdb1 remove left-over of Generic rules 2020-07-29 02:28:32 +02:00
TomasVotruba
1e7ad43b4d rename CreateRector command to only Create 2020-07-29 02:27:21 +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
2eddb274c2 use standard __ for vars 2020-07-28 23:54:13 +02:00
TomasVotruba
6817edb902 improve create rector command with configuration 2020-07-28 17:46:48 +02:00
TomasVotruba
cdd3935ef6 add RecipeOption to prevent typos; first attempt to use constant-named parameters 2020-07-28 17:46:48 +02:00
rector-bot
d994b87899 fixup! fixup! Enable Order Set with failing rules disabled 2020-07-27 21:49:22 +00:00
rector-bot
d5cde3eae1 fixup! Enable Order Set with failing rules disabled 2020-07-27 21:48:27 +00:00
TomasVotruba
e647b8f003 decopule PropertyDocBlockManipulator 2020-07-27 12:56:13 +02:00
TomasVotruba
8b1cdcb46e decouple PhpDocTypeChanger 2020-07-27 12:38:06 +02:00
TomasVotruba
110316f471 [Naming] fix tag rename in RenamePropertyToMatchTypeRector 2020-07-27 11:16:36 +02:00
TomasVotruba
99db894192 restore types 2020-07-27 10:44:51 +02:00
TomasVotruba
c28a5a9746 [Celebrity] Merge to code-quality 2020-07-27 10:18:03 +02:00
TomasVotruba
8e1fb6d8e8 rename nette-application-code-quality to just nette-code-quality 2020-07-26 18:55:32 +02:00
TomasVotruba
0650075005 [Nette] Add ChangeControlArrayAccessToAnnotatedControlVariableRector 2020-07-26 15:54:46 +02:00
dobryy
f37cd4cac3 [Order] Apply rule 2020-07-26 15:11:41 +02:00
TomasVotruba
5106475aae bump to phpstan 0.12.33 2020-07-26 11:30:43 +02:00