From d6b59ca2b8fa6ad764e688449eab83d7e22eb2ab Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 9 Jul 2026 20:43:55 +0000 Subject: [PATCH] Apply fixes from StyleCI --- LibreNMS/Data/Graphing/AbstractGraph.php | 3 +-- app/Http/Requests/GraphRequest.php | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LibreNMS/Data/Graphing/AbstractGraph.php b/LibreNMS/Data/Graphing/AbstractGraph.php index b3245f4253..1fde877afa 100644 --- a/LibreNMS/Data/Graphing/AbstractGraph.php +++ b/LibreNMS/Data/Graphing/AbstractGraph.php @@ -44,8 +44,7 @@ abstract class AbstractGraph implements GraphInterface public function __construct( protected readonly GraphParameters $params, protected readonly array $vars = [], - ) - { + ) { $device_id = $this->vars['device'] ?? ($this->params->type == 'device' ? ($this->vars['id'] ?? null) : null); $this->device = DeviceCache::get($device_id); diff --git a/app/Http/Requests/GraphRequest.php b/app/Http/Requests/GraphRequest.php index f44543c3e8..16d21b6b4f 100644 --- a/app/Http/Requests/GraphRequest.php +++ b/app/Http/Requests/GraphRequest.php @@ -115,6 +115,7 @@ public function rules(): array try { $graphRules = $this->getGraph()->validation(); + return array_merge($baseRules, $graphRules); } catch (\Throwable) { return $baseRules; @@ -176,6 +177,7 @@ public function getGraph(): GraphInterface if ($this->graph === null) { $this->graph = app(GraphFactory::class)->graphFor($this->type ?: $this->string('type', '')->toString(), $this->toVars()); } + return $this->graph; } }