Skip to content

Commit 3fc1ca2

Browse files
authored
Merge pull request #61 from assoconnect/jwa_add_rector
Adds Rector for code refactoring
2 parents c785fc0 + ae641a8 commit 3fc1ca2

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
"assoconnect/php-quality-config": "^1.10",
5858
"guzzlehttp/guzzle": "^7.7",
5959
"guzzlehttp/psr7": "^2.4.5",
60-
"phpstan/phpstan-symfony": "^1.3.7"
60+
"phpstan/phpstan-symfony": "^1.3.7",
61+
"rector/rector": "^1.2"
6162
},
6263
"config": {
6364
"allow-plugins": {

rector.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Config\RectorConfig;
6+
7+
return RectorConfig::configure()
8+
->withPaths([
9+
__DIR__ . '/src',
10+
__DIR__ . '/tests',
11+
])
12+
// uncomment to reach your current PHP version
13+
// ->withPhpSets()
14+
->withTypeCoverageLevel(0)
15+
->withSets([
16+
__DIR__ . '/vendor/assoconnect/php-quality-config/src/Rector/rules.php',
17+
]);

0 commit comments

Comments
 (0)