Skip to content

Commit 5303bc9

Browse files
committed
Apply fixes from StyleCI
1 parent f8a7c6f commit 5303bc9

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

LibreNMS/Discovery/Yaml/YamlDiscoveryField.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public function getNumericNames(): array
8686
if ($this->key === 'value') {
8787
// only one oid
8888
$prefix = strstr($this->model_column, '_', true) ?: $this->model_column;
89+
8990
return [
9091
'num_oid',
9192
$prefix . '_oid',
@@ -102,6 +103,7 @@ private function setValue(mixed $value): void
102103
{
103104
if (is_callable($this->callback)) {
104105
$this->value = call_user_func($this->callback, $value);
106+
105107
return;
106108
}
107109

LibreNMS/Modules/Processors.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function poll(OS $os, DataStorageInterface $datastore): void
8989
Log::info("$processor->processor_descr: $usage%");
9090

9191
$rrd_name = ['processor', $processor->processor_type, $processor->processor_index];
92-
$tags = ['processor_type' => $processor->processor_type, 'processor_index' => $processor->processor_index, 'rrd_name' => $rrd_name, 'rrd_def' => $rrd_def];
92+
$tags = ['processor_type' => $processor->processor_type, 'processor_index' => $processor->processor_index, 'rrd_name' => $rrd_name, 'rrd_def' => $rrd_def];
9393
$fields = ['usage' => $usage];
9494
$datastore->put($os->getDeviceArray(), 'processors', $tags, $fields);
9595

LibreNMS/OS/Boss.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
use App\Models\PortVlan;
3434
use App\Models\Vlan;
3535
use Illuminate\Support\Collection;
36-
use LibreNMS\Device\Processor;
3736
use LibreNMS\Interfaces\Discovery\OSDiscovery;
3837
use LibreNMS\Interfaces\Discovery\VlanDiscovery;
3938
use LibreNMS\Interfaces\Discovery\VlanPortDiscovery;

LibreNMS/OS/Lcossx.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function pollProcessors(Collection $processors): Collection
9595
$cpuList = $this->convertProcessorData($data);
9696

9797
foreach ($processors as $processor) {
98-
$key = explode(' ',(string) $processor->processor_descr)[1];
98+
$key = explode(' ', (string) $processor->processor_descr)[1];
9999
$processor->processor_usage = $cpuList[$key] ?? 0;
100100
}
101101

LibreNMS/OS/Traits/VxworksProcessorUsage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ trait VxworksProcessorUsage
4141
*/
4242
public function discoverProcessors($oid = '.1.3.6.1.4.1.4413.1.1.1.1.4.9.0'): Collection
4343
{
44-
$usage = SnmpQuery::get($oid)->value();
44+
$usage = SnmpQuery::get($oid)->value();
4545
if ($usage) {
4646
$usage = $this->parseCpuUsageString($usage);
4747
if (is_numeric($usage)) {

app/View/SimpleTemplate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ private function dateFilter(string $value, array $args): string
269269

270270
private function padFilter(string $value, array $args): string
271271
{
272-
$direction = match($args[2] ?? 'left') {
272+
$direction = match ($args[2] ?? 'left') {
273273
'right' => STR_PAD_RIGHT,
274274
'both' => STR_PAD_BOTH,
275275
default => STR_PAD_LEFT,

0 commit comments

Comments
 (0)