Add phpstan level 7(#544)

This commit is contained in:
Saeed Vaziry
2025-03-12 13:31:10 +01:00
committed by GitHub
parent c22bb1fa80
commit 493cbb0849
437 changed files with 4505 additions and 2193 deletions

View File

@ -18,7 +18,10 @@ class View extends Page
public function mount(): void
{
$this->authorize('view', [$this->server, auth()->user()->currentProject]);
/** @var \App\Models\User $user */
$user = auth()->user();
$this->authorize('view', [$this->server, $user->currentProject]);
$this->previousStatus = $this->server->status;
}
@ -36,6 +39,9 @@ public function refresh(): void
public function getWidgets(): array
{
/** @var \App\Models\User $user */
$user = auth()->user();
$widgets = [];
if ($this->server->isInstalling()) {
@ -44,7 +50,7 @@ public function getWidgets(): array
$widgets[] = [ServerStats::class, ['server' => $this->server]];
}
if (auth()->user()->can('viewAny', [ServerLog::class, $this->server])) {
if ($user->can('viewAny', [ServerLog::class, $this->server])) {
$widgets[] = [
LogsList::class, [
'server' => $this->server,