73 Commits

Author SHA1 Message Date
Abdul Malik Ikhsan
a38debb672
[DX] Fixes #4205 Change phpversion from string to php constant int type (#4679)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-24 16:32:49 +01:00
Tomas Votruba
a7705ed0a5
[Symplify 9] First update + switch to RuleDocGenerator (#4616)
* [composer] bump to Symplify 9

* [Symplify 9] Update phpstan rules

* bump to Symplify 9 BETA2

* update AbstractKernel from Tests to Testing namespace

* decoupling removing node trait

* remove fluent calls

* removing variadic

* [CodingStyle] Improve AnnotateThrowablesRector

* bump deps

* Make use of RuleDocGenerator

* first short

* [DocumentationGenerator] Drop deprecated package, RuleSetGenerator now handles it

* import namespace

* update docs
2020-11-16 17:50:38 +00:00
Abdul Malik Ikhsan
0cc7b66a1e
[FileSystem] Improve MovedFileWithNodesFactory : SKip if desiredGroupName already inside oldClassName (#4554) 2020-11-04 15:55:22 +01:00
Tomas Votruba
c03b66f7cd
move suffix filesystem 2 (#4529)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-01 16:39:04 +01:00
Tomas Votruba
8542a3bcbc
Move from Filesystem rules to FileNode (#4528)
* make MoveServicesBySuffixToDirectoryRector with non-filesystem rector

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Apply coding standards

* fixup! make MoveServicesBySuffixToDirectoryRector with non-filesystem rector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-31 21:39:09 +00:00
Tomas Votruba
0513315056
Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node (#4522)
* Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node

* update DecoupleClassMethodToOwnClassRector

* [ci] add rebase jobp

* disable fail fast for unit tests

* misc
2020-10-31 12:59:40 +00:00
Tomas Votruba
bc41ba2b2e
phpstan cleanup (#4509)
* move tag objects to ValueObject namespace

* [ci] temporarily disable weird broken monorepo split, wait for move to github actoins
2020-10-29 23:06:26 +01:00
Abdul Malik Ikhsan
449801e1f3
Add regex uri to regex constant (#4504)
Co-authored-by: Jan Lohage <j2L4e@users.noreply.github.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-29 19:04:33 +01:00
Tomas Votruba
a1e50263d2
[cs] improve configured rules types (#4491)
* [cs] improve configured rules types

* [ci] update env variable
2020-10-27 14:00:39 +00:00
Tomas Votruba
0f2e6d407e
[DoctrineAnnotaitonGenerated] Update to doctrine/annotations 1.11 + fix static (#4479) 2020-10-25 14:43:05 +01:00
Tomas Votruba
e47a806300
Remove AbstractFileSystemRector and move to AbstractRector (#4378) 2020-10-09 21:51:09 +02:00
Tomas Votruba
8ae3868a57
[Restoration] Add RestoreFullyQualifiedNameRector (#4336)
* [Restoration] Add RestoreFullyQualifiedNameRector

* update docs

* use service aware test case for PHPStan rules

* improve FullyQualifiedNameMatcher

* cs fixes

* add return doc resolution

* composer: bump to symfony 4.4/5.1
2020-10-01 19:45:29 +00:00
Tomas Votruba
7aad4bbf2f
[PHPStan] Enable regex constant rule (#4279) 2020-09-23 11:16:40 +02:00
Igor
19f700ba4e
[Naming] Factory to create PropertyRename (#4255)
* [Naming] Use factory to create PropertyRename

* Ignore new phpstan issues

* Move fixture to FixtureBasic to solve CI issue

* fix setUp vs dataProvider race condition

* fix autoload

Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-21 20:45:43 +00:00
Igor
f2ecdeb0b1
[Naming] Foreach over "data", renames to "datum" (#4221)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-15 10:23:13 +02:00
dobryy
a6444fb801
[DX] Configurable rule must have configure code sample, and vice versa (#4174)
* [DX] Configurable rule must have configure code sample, and vice versa

* Add ConfiguredCodeSample

* heredocs

* code sample

* fix class

* drop AbstractConfigurableMatchTypeRector

Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-11 11:21:48 +02:00
Tomas Votruba
1a2e9cbb33
static fixes (#4140) 2020-09-07 17:40:46 +02: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
geryguilbon
5d521b4d9f
BUGFIX: Correction of parsing error while executing command 'composer complete-check' (#4072) 2020-08-30 13:12:21 +00:00
Tomas Votruba
190d7cf616
update ecs (#4048)
* remove array return

* misc
2020-08-28 23:10:00 +02:00
Tomas Votruba
fd69d845e4
Refactor extra file tests wobbly arrays to typed value objects (#3996) 2020-08-21 13:30:28 +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
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
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
e7429d96a4
make use of constant (#3875) 2020-08-02 13:17:33 +00: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
TomasVotruba
fa76a56e08 fix value object moving 2020-07-30 15:31:37 +02:00
TomasVotruba
fe72e003ed use constants in configs 2020-07-30 13:53:53 +02:00
TomasVotruba
99db894192 restore types 2020-07-27 10:44:51 +02:00
dobryy
f37cd4cac3 [Order] Apply rule 2020-07-26 15:11:41 +02:00
TomasVotruba
7ed4cb19c4 simplify config globs 2020-07-25 20:14:28 +02:00
TomasVotruba
0944b75f7e correct namespace in configs 2020-07-18 11:58:17 +02:00
TomasVotruba
0c816d60f8 [config] switch rules config from YAML to PHP 2020-07-16 12:48:54 +02:00
TomasVotruba
3c3c3a9530 remove func call from methods calls 2020-07-06 01:59:41 +02:00
TomasVotruba
c08d874107 make use PhpDocTrait 2020-06-30 02:27:55 +02:00
TomasVotruba
7f49658112 change test(string ) to test(SmartFileInfo ) in tests 2020-06-25 20:02:36 +02:00
TomasVotruba
fe571b1bbf one more fix 2020-06-23 19:31:55 +02:00
TomasVotruba
bbc2f1e7d9 re-use class name 2020-06-23 19:20:32 +02:00
TomasVotruba
8d38c20300 check types correctly in value object class 2020-06-23 19:17:15 +02:00
TomasVotruba
4e2327a2f2 fix double load of test fixture 2020-06-23 19:11:44 +02:00
TomasVotruba
77d46cb7ae prevent exception on class duplicate rename, just skip 2020-06-23 19:11:32 +02:00
TomasVotruba
50f3c0454d skip common patterns in value object 2020-06-23 18:26:06 +02:00
TomasVotruba
dd3c1bd523 add types/suffix support 2020-06-23 13:11:48 +02:00
TomasVotruba
baee588461 add rename neon/yaml file content case 2020-06-21 19:03:39 +02:00
TomasVotruba
fac932a8bd cleanup 2020-06-21 11:46:52 +02:00
TomasVotruba
ff4c3cc8ce decopule NodesWithFileDestinationPrinter 2020-06-21 02:31:27 +02:00
TomasVotruba
97a50186f0 decopule AbstractFileMovingFileSystemRector 2020-06-19 18:01:50 +02:00
TomasVotruba
489531aee7 skip interface 2020-06-19 17:09:59 +02:00
TomasVotruba
bfbbcb6a81 add test case for MoveValueObjectsToValueObjectDirectoryRector 2020-06-19 16:10:28 +02:00
TomasVotruba
f83c6c080e decouple ControlFactoryInterfaceAnalyzer 2020-06-19 15:51:41 +02:00