File tree Expand file tree Collapse file tree 4 files changed +79
-33
lines changed
Expand file tree Collapse file tree 4 files changed +79
-33
lines changed Original file line number Diff line number Diff line change 1515 "vimeo/psalm" : " ^5.9" ,
1616 "sabre/vobject" : " ^4.5" ,
1717 "rector/rector" : " ^1.0" ,
18- "phpunit/phpunit" : " ^9.6"
18+ "phpunit/phpunit" : " ^9.6" ,
19+ "nextcloud/rector" : " ^0.2.1"
1920 },
2021 "require" : {
2122 "php" : " ^8.0.2" ,
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- use Rector \ CodeQuality \ Rector \Empty_ \ SimplifyEmptyCheckOnEmptyArrayRector ;
5+ use Nextcloud \ Rector \Set \ NextcloudSets ;
66use Rector \Config \RectorConfig ;
7- use Rector \DeadCode \Rector \ClassMethod \RemoveUnusedPromotedPropertyRector ;
8- use Rector \Php54 \Rector \Array_ \LongArrayToShortArrayRector ;
9- use Rector \Set \ValueObject \LevelSetList ;
10- use Rector \Set \ValueObject \SetList ;
117
12- return static function (RectorConfig $ rectorConfig ): void {
13- $ rectorConfig ->paths ([
8+ return RectorConfig::configure ()
9+ ->withPaths ([
10+ __DIR__ . '/appinfo ' ,
1411 __DIR__ . '/lib ' ,
1512 __DIR__ . '/tests ' ,
13+ ])
14+ ->withPhpSets (php81: true )
15+ ->withTypeCoverageLevel (1 )
16+ ->withSets ([
17+ NextcloudSets::NEXTCLOUD_27 ,
1618 ]);
17-
18- // register a single rule
19- $ rectorConfig ->rule (RemoveUnusedPromotedPropertyRector::class);
20- $ rectorConfig ->rule (SimplifyEmptyCheckOnEmptyArrayRector::class);
21- $ rectorConfig ->rule (LongArrayToShortArrayRector::class);
22-
23- // define sets of rules
24- $ rectorConfig ->sets ([
25- LevelSetList::UP_TO_PHP_80 ,
26- // SetList::CODE_QUALITY,
27- SetList::CODING_STYLE ,
28- SetList::TYPE_DECLARATION ,
29- // SetList::DEAD_CODE,
30- ]);
31- };
Original file line number Diff line number Diff line change 4444use Psr \Log \LoggerInterface ;
4545
4646class OperationTest extends TestCase {
47- /** @var IL10N&MockObject */
48- private IL10N |MockObject $ l ;
49- /** @var IManager&MockObject */
50- private IManager |MockObject $ calendarManager ;
47+ private IL10N &MockObject $ l ;
48+ private IManager &MockObject $ calendarManager ;
5149 private Operation $ operation ;
52- /** @var ICreateFromString&MockObject */
53- private ICreateFromString |MockObject $ calendar ;
54- /** @var FlatpakAdapter&MockObject */
55- private FlatpakAdapter |MockObject $ flatpakAdapter ;
50+ private ICreateFromString &MockObject $ calendar ;
51+ private FlatpakAdapter &MockObject $ flatpakAdapter ;
5652
5753 protected function setUp (): void {
5854 parent ::setUp ();
You can’t perform that action at this time.
0 commit comments