mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-17 20:08:52 +00:00
Fix code quality with rector [skip ci]
This commit is contained in:
@@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user