File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 "cs:check" : " php-cs-fixer fix --dry-run --diff" ,
2222 "cs:check:force" : " PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --dry-run --diff" ,
2323 "lint" : " find . -name \\ *.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l" ,
24+ "rector:apply" : " rector && composer cs:fix" ,
25+ "rector:check" : " rector --dry-run" ,
2426 "test:unit" : " phpunit -c phpunit.xml --fail-on-warning" ,
2527 "test:unit:coverage" : " phpunit --coverage-clover coverage.xml -c phpunit.xml --fail-on-warning " ,
2628 "test:unit:dev" : " phpunit -c phpunit.xml --fail-on-warning --stop-on-error --stop-on-failure" ,
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ /**
6+ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
7+ * SPDX-License-Identifier: AGPL-3.0-or-later
8+ */
9+
10+ use Rector \Config \RectorConfig ;
11+ use Rector \Php80 \Rector \Class_ \ClassPropertyAssignToConstructorPromotionRector ;
12+ use Rector \TypeDeclaration \Rector \Property \TypedPropertyFromStrictConstructorRector ;
13+ use Rector \ValueObject \PhpVersion ;
14+
15+ return RectorConfig::configure ()
16+ ->withPaths ([
17+ __DIR__ . '/appinfo/routes.php ' ,
18+ __DIR__ . '/lib ' ,
19+ __DIR__ . '/tests/unit ' ,
20+ ])
21+ ->withAutoloadPaths ([
22+ __DIR__ . '/vendor-bin/rector/vendor/nextcloud/ocp/OCP ' ,
23+ ])
24+ ->withImportNames (importShortClasses: false )
25+ ->withPhpVersion (PhpVersion::PHP_82 )
26+ ->withRules ([
27+ TypedPropertyFromStrictConstructorRector::class,
28+ ])
29+ ->withConfiguredRule (ClassPropertyAssignToConstructorPromotionRector::class, [
30+ 'inline_public ' => true ,
31+ 'rename_property ' => true ,
32+ ]);
Original file line number Diff line number Diff line change 1+ {
2+ "config" : {
3+ "platform" : {
4+ "php" : " 8.1"
5+ },
6+ "sort-packages" : true
7+ },
8+ "require-dev" : {
9+ "nextcloud/rector" : " ^0.5.2"
10+ }
11+ }
You can’t perform that action at this time.
0 commit comments