From d288a98ec01573f63b3e11cda151527ada985f3d Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Fri, 14 Jun 2024 13:32:15 +0000 Subject: [PATCH] Apply fixes from StyleCI --- .../Device/Tabs/PortsController.php | 18 +++++++++--------- .../html/pages/device/neighbours/list.inc.php | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Device/Tabs/PortsController.php b/app/Http/Controllers/Device/Tabs/PortsController.php index 661b06ffcf6a..a035e6c6c7f0 100644 --- a/app/Http/Controllers/Device/Tabs/PortsController.php +++ b/app/Http/Controllers/Device/Tabs/PortsController.php @@ -290,25 +290,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', ], ]; @@ -317,7 +317,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', ]; } @@ -338,10 +338,10 @@ private function getFilteredPortsQuery(Device $device, Request $request, array $ return $device->ports() ->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)) + ->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); } diff --git a/includes/html/pages/device/neighbours/list.inc.php b/includes/html/pages/device/neighbours/list.inc.php index b6631c36818b..baed5bca6e2b 100644 --- a/includes/html/pages/device/neighbours/list.inc.php +++ b/includes/html/pages/device/neighbours/list.inc.php @@ -1,4 +1,5 @@ load(['links.port', 'links.remoteDevice', 'links.remotePort']); echo view('device.tabs.ports.links', [ 'data' => [