Fix code quality with rector [skip ci]

This commit is contained in:
James Cole
2025-11-09 09:08:03 +01:00
parent d2610be790
commit 68183a0a0e
209 changed files with 1021 additions and 1248 deletions

View File

@@ -104,7 +104,7 @@ class General extends AbstractExtension
{
return new TwigFunction(
'activeRoutePartialObjectType',
static function ($context): string {
static function (array $context): string {
[, $route, $objectType] = func_get_args();
$activeObjectType = $context['objectType'] ?? false;
@@ -292,11 +292,7 @@ class General extends AbstractExtension
'hasRole',
static function (string $role): bool {
$repository = app(UserRepositoryInterface::class);
if ($repository->hasRole(auth()->user(), $role)) {
return true;
}
return false;
return $repository->hasRole(auth()->user(), $role);
}
);
}