Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy132 committed Sep 19, 2024
1 parent a7b8b34 commit ea66fc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Filament/Resources/RoleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public static function form(Form $form): Form
$options = [];

foreach (RolePermissionPrefixes::cases() as $prefix) {
$options[$prefix->value . ' ' . strtolower($model->value)] = Str::headline($prefix);
$options[$prefix->value . ' ' . strtolower($model->value)] = Str::headline($prefix->value);
}

if (array_key_exists($model, Role::MODEL_SPECIFIC_PERMISSIONS)) {
if (array_key_exists($model->value, Role::MODEL_SPECIFIC_PERMISSIONS)) {
foreach (Role::MODEL_SPECIFIC_PERMISSIONS[$model] as $permission) {

Check failure on line 47 in app/Filament/Resources/RoleResource.php

View workflow job for this annotation

GitHub Actions / PHPStan

Invalid array key type App\Enums\RolePermissionModels::ApiKey|App\Enums\RolePermissionModels::Database|App\Enums\RolePermissionModels::DatabaseHost|App\Enums\RolePermissionModels::Egg|App\Enums\RolePermissionModels::Mount|App\Enums\RolePermissionModels::Node|App\Enums\RolePermissionModels::Role|App\Enums\RolePermissionModels::Server|App\Enums\RolePermissionModels::User.
$options[$permission . ' ' . strtolower($model->value)] = Str::headline($permission);
}
Expand Down

0 comments on commit ea66fc7

Please sign in to comment.