Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant authored and StyleCIBot committed Jun 14, 2024
1 parent 53c5328 commit 7062c21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/Http/Controllers/Device/Tabs/PortsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,25 +320,25 @@ private function getGraphLinks(): array
'name' => __('port.graphs.bits'),
'url' => 'graphs?type=bits',
'sub_name' => __('Mini'),
'sub_url' => 'mini_graphs?type=bits'
'sub_url' => 'mini_graphs?type=bits',
],
[
'name' => __('port.graphs.upkts'),
'url' => 'graphs?type=upkts',
'sub_name' => __('Mini'),
'sub_url' => 'mini_graphs?type=upkts'
'sub_url' => 'mini_graphs?type=upkts',
],
[
'name' => __('port.graphs.nupkts'),
'url' => 'graphs?type=nupkts',
'sub_name' => __('Mini'),
'sub_url' => 'mini_graphs?type=nupkts'
'sub_url' => 'mini_graphs?type=nupkts',
],
[
'name' => __('port.graphs.errors'),
'url' => 'graphs?type=errors',
'sub_name' => __('Mini'),
'sub_url' => 'mini_graphs?type=errors'
'sub_url' => 'mini_graphs?type=errors',
],
];

Expand All @@ -347,7 +347,7 @@ private function getGraphLinks(): array
'name' => __('port.graphs.etherlike'),
'url' => 'graphs?type=etherlike',
'sub_name' => __('Mini'),
'sub_url' => 'mini_graphs?type=etherlike'
'sub_url' => 'mini_graphs?type=etherlike',
];
}

Expand All @@ -368,10 +368,10 @@ private function getFilteredPortsQuery(Device $device, Request $request, array $

return $device->ports()

Check failure on line 369 in app/Http/Controllers/Device/Tabs/PortsController.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.1)

Call to an undefined method Illuminate\Database\Eloquent\Builder<Illuminate\Database\Eloquent\Model>::hasAccess().
->isNotDeleted()
->when(!$request->input('disabled'), fn(Builder $q, $disabled) => $q->where('disabled', 0))
->when(!$request->input('ignore'), fn(Builder $q, $disabled) => $q->where('ignore', 0))
->when($request->input('admin') != 'any', fn(Builder $q, $admin) => $q->where('ifAdminStatus', $request->input('admin', 'up')))
->when($request->input('status', 'any') != 'any', fn(Builder $q, $admin) => $q->where('ifOperStatus', $request->input('status')))
->when(! $request->input('disabled'), fn (Builder $q, $disabled) => $q->where('disabled', 0))

Check failure on line 371 in app/Http/Controllers/Device/Tabs/PortsController.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.1)

Parameter #2 $callback of method Illuminate\Database\Eloquent\Relations\HasMany<App\Models\Port>::when() expects (callable(Illuminate\Database\Eloquent\Relations\HasMany<App\Models\Port>, bool): Illuminate\Database\Eloquent\Builder)|null, Closure(Illuminate\Database\Eloquent\Builder, mixed): Illuminate\Database\Eloquent\Builder given.
->when(! $request->input('ignore'), fn (Builder $q, $disabled) => $q->where('ignore', 0))
->when($request->input('admin') != 'any', fn (Builder $q, $admin) => $q->where('ifAdminStatus', $request->input('admin', 'up')))
->when($request->input('status', 'any') != 'any', fn (Builder $q, $admin) => $q->where('ifOperStatus', $request->input('status')))
->orderBy($orderBy, $this->sortOrder)
->hasAccess(Auth::user())->with($relationships);
}
Expand Down
1 change: 1 addition & 0 deletions includes/html/pages/device/neighbours/list.inc.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

DeviceCache::get($device['device_id'])->load(['links.port', 'links.remoteDevice', 'links.remotePort']);
echo view('device.tabs.ports.links', [
'data' => [
Expand Down

0 comments on commit 7062c21

Please sign in to comment.