Skip to content

Commit 3c2a4a0

Browse files
committed
Adds Rector for automated refactoring
Adds Rector to the project's dev dependencies. This allows for automated code refactoring and upgrades, helping to maintain code quality and consistency. Also includes a basic Rector configuration file, ready to be customized with specific rulesets.
1 parent 686f6d1 commit 3c2a4a0

3 files changed

Lines changed: 136 additions & 3 deletions

File tree

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"symfony/filesystem": "^6.0"
2828
},
2929
"require-dev": {
30-
"symfony/test-pack": "^1.0"
30+
"symfony/test-pack": "^1.0",
31+
"rector/rector": "^2.2"
3132
}
3233
}

composer.lock

Lines changed: 115 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rector.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
->withDeadCodeLevel(0)
16+
->withCodeQualityLevel(0)
17+
->withSets([
18+
__DIR__ . '/vendor/assoconnect/php-quality-config/src/Rector/rules.php',
19+
]);

0 commit comments

Comments
 (0)