phpstan 5 errors fixed

This commit is contained in:
2024-11-25 15:34:09 +05:00
parent 2e0cc45e99
commit 0d875acc4e
28 changed files with 463 additions and 248 deletions

View File

@@ -40,10 +40,6 @@ trait CurrencyRateAuth
return;
}
if ($this->resource->user_id == auth()->id()) {
return;
}
throw new AuthorizationException;
}
@@ -74,6 +70,6 @@ trait CurrencyRateAuth
/** Force delete */
public function authorizedToForceDelete(Request $request)
{
throw_unless(auth()->user()->isMe(), AuthorizationException::class);
return auth()->user()->isMe();
}
}

View File

@@ -12,7 +12,7 @@ class NovaVisaMasterSetting extends Resource
/**
* The model the resource corresponds to.
*
* @var class-string<\App\Models\Resources\NovaVisaMasterSetting>
* @var class-string<\App\Modules\VisaMasterSettings\Models\VisaMasterSettings>
*/
public static $model = \App\Modules\VisaMasterSettings\Models\VisaMasterSettings::class;