mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 07:22:34 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user