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 f1585e1 commit cb58d96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Http/Controllers/Device/Tabs/PortsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ private function getFilteredPortsQuery(Device $device, Request $request, array $

return $device->ports()

Check failure on line 345 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 347 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 cb58d96

Please sign in to comment.