Skip to content

Commit

Permalink
feat(rector): Add rector to the repository
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Sep 26, 2024
1 parent f67e2ff commit 374b5f9
Show file tree
Hide file tree
Showing 5 changed files with 222 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ updates:
- "/vendor-bin/mozart"
- "/vendor-bin/phpunit"
- "/vendor-bin/psalm"
- "/vendor-bin/rector"
commit-message:
prefix: "ci"
include: "scope"
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"cs:fix": "php-cs-fixer fix",
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './lib/Vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l",
"openapi": "generate-spec --verbose && (npm run typescript:generate || echo 'Please manually regenerate the typescript OpenAPI models')",
"rector:check": "rector --dry-run",
"rector:fix": "rector",
"psalm": "psalm --threads=1",
"psalm:dev": "psalm --no-cache --threads=$(nproc)",
"psalm:update-baseline": "psalm --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
Expand Down
15 changes: 15 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/appinfo',
__DIR__ . '/lib',
__DIR__ . '/templates',
__DIR__ . '/tests/php',
])
->withSkipPath(__DIR__ . '/lib/Vendor')
->withPhpSets(php73: true)
->withTypeCoverageLevel(0);
6 changes: 6 additions & 0 deletions vendor-bin/rector/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"require-dev": {
"rector/rector": "^1.2",
"nextcloud/rector": "^0.1.0"
}
}
198 changes: 198 additions & 0 deletions vendor-bin/rector/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 374b5f9

Please sign in to comment.