Skip to content

Commit

Permalink
Fix rebase stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
afbora committed Dec 12, 2024
1 parent aa222cc commit 4e56591
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
16 changes: 7 additions & 9 deletions src/Cms/Find.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ public static function user(string|null $id = null): User|null
return $user;
}

throw new NotFoundException([
'key' => 'user.undefined'
]);
throw new NotFoundException(
key: 'user.undefined'
);
}

// get a specific user by id
Expand All @@ -176,11 +176,9 @@ public static function user(string|null $id = null): User|null
return $user;
}

throw new NotFoundException([
'key' => 'user.notFound',
'data' => [
'name' => $id
]
]);
throw new NotFoundException(
key: 'user.notFound',
data: ['name' => $id]
);
}
}
12 changes: 9 additions & 3 deletions src/Cms/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ public static function create(array $props): static
$language = new static($props);

if ($language->permissions()->can('create') === false) {
throw new PermissionException(key: 'language.create.permission');
throw new PermissionException(
key: 'language.create.permission'
);
}

// validate the new language
Expand Down Expand Up @@ -222,7 +224,9 @@ public static function create(array $props): static
public function delete(): bool
{
if ($this->permissions()->can('delete') === false) {
throw new PermissionException(key: 'language.delete.permission');
throw new PermissionException(
key: 'language.delete.permission'
);
}

$kirby = App::instance();
Expand Down Expand Up @@ -589,7 +593,9 @@ public function url(): string
public function update(array|null $props = null): static
{
if ($this->permissions()->can('update') === false) {
throw new PermissionException(key: 'language.update.permission');
throw new PermissionException(
key: 'language.update.permission'
);
}

$kirby = App::instance();
Expand Down

0 comments on commit 4e56591

Please sign in to comment.