Skip to content

Commit

Permalink
apply php7.4 rule
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Jul 17, 2024
1 parent 6a2bad5 commit 50d550e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
16 changes: 8 additions & 8 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
__DIR__ . '/tests/src',
])
->withPreparedSets(
codeQuality: true,
codingStyle: true,
deadCode: true,
// codeQuality: true,
// codingStyle: true,
// deadCode: true,
// earlyReturn: true,
// instanceOf: true,
// privatization: true,
// strictBooleans: true,
)
// uncomment to reach your current PHP version
// ->withPhpSets()
->withPhpSets(php74: true)
->withTypeCoverageLevel(0)
->withRules([
AddOverrideAttributeToOverriddenMethodsRector::class
// AddOverrideAttributeToOverriddenMethodsRector::class
])
->withSkip([
FlipTypeControlToUseExclusiveTypeRector::class,
SimplifyIfElseToTernaryRector::class,
RemoveDeadTryCatchRector::class,
// FlipTypeControlToUseExclusiveTypeRector::class,
// SimplifyIfElseToTernaryRector::class,
// RemoveDeadTryCatchRector::class,
]);
4 changes: 1 addition & 3 deletions tests/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@

require_once __DIR__ . '/../../vendor/autoload_runtime.php';

return function (array $context) {
return new Kernel();
};
return fn(array $context) => new Kernel();
12 changes: 3 additions & 9 deletions tests/src/UnitTests/CountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ public static function provider(): iterable
adapter: new SelectableAdapter(
collection: $collection
),
count: function () use ($collection) {
return $collection->count();
},
count: fn () => $collection->count(),
),
5,
];
Expand Down Expand Up @@ -111,9 +109,7 @@ public static function provider(): iterable
adapter: new SelectableAdapter(
collection: $collection
),
count: function () use ($collection) {
return $collection->count();
},
count: fn () => $collection->count(),
),
5,
];
Expand Down Expand Up @@ -147,9 +143,7 @@ public static function provider(): iterable
adapter: new PagerfantaAdapterAdapter(
adapter: new PagerfantaSelectableAdapter($collection, Criteria::create())
),
count: function () use ($collection) {
return $collection->count();
},
count: fn () => $collection->count(),
),
5,
];
Expand Down

0 comments on commit 50d550e

Please sign in to comment.