Skip to content

Commit a65b1ff

Browse files
committed
Apply fixes from StyleCI
1 parent c937822 commit a65b1ff

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

LibreNMS/Enum/AlertLogState.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ enum AlertLogState: int
1414

1515
public function isActive(): bool
1616
{
17-
return match($this) {
17+
return match ($this) {
1818
self::Active, self::Worse, self::Better, self::Changed => true,
1919
default => false,
2020
};
2121
}
2222

2323
public function asSeverity(): Severity
2424
{
25-
return match($this) {
25+
return match ($this) {
2626
self::Clear, self::Recovered => Severity::Ok,
2727
self::Active => Severity::Error,
2828
self::Acknowledged => Severity::Info,

app/Http/Controllers/Table/AlertLogController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ class AlertLogController extends TableController
1515

1616
public function __construct(
1717
private readonly AlertLogDetailFormatter $formatter
18-
) {}
18+
) {
19+
}
1920

2021
protected function rules()
2122
{
@@ -43,7 +44,7 @@ protected function searchFields(Request $request)
4344
return [
4445
'device' => ['hostname', 'sysname'],
4546
'rule' => ['name'],
46-
// 'time_logged', // how would this be useful? removed
47+
// 'time_logged', // how would this be useful? removed
4748
];
4849
}
4950

app/Http/Formatters/AlertLogDetailFormatter.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ private function formatDetails(int $row, array $alert_detail, ?string $type_info
7676
}
7777

7878
return $fault_detail . '<br>';
79-
8079
}
8180

8281
private function fallbackFormatting(array $detail): string
@@ -138,7 +137,6 @@ private function formatPort(array $detail): ?string
138137
return $output;
139138
}
140139

141-
142140
private function formatAccessPoint(array $detail): ?string
143141
{
144142
if (empty($detail['accesspoint_id'])) {
@@ -173,7 +171,6 @@ private function formatSensor(array $detail): ?string
173171
? "State: $value (numerical $sensor->sensor_current)"
174172
: "Value: $value ($sensor->sensor_class)";
175173

176-
177174
$thresholds = [];
178175
if ($sensor->sensor_limit_low) {
179176
$thresholds[] = 'low: ' . $sensor->sensor_limit_low;

includes/html/common/alert-log.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
$common_output[] = '
5959
<div class="table-responsive">
60-
<table id="alertlog" class="table table-hover table-condensed table-striped" data-url="' . route('table.alertlog') . '">
60+
<table id="alertlog" class="table table-hover table-condensed table-striped" data-url="' . route('table.alertlog') . '">
6161
<thead>
6262
<tr>
6363
<th data-column-id="status">State</th>
@@ -96,9 +96,9 @@
9696
<select name="state" id="state" class="form-control input-sm"> \\';
9797
foreach ($alert_states as $text => $value) {
9898
$selected = $value == (request()->get('state', '')) ? ' selected' : '';
99-
$common_output[] = "<option value=\"" . htmlspecialchars((string) $value) . "\"$selected>$text</option> \\";
99+
$common_output[] = '<option value="' . htmlspecialchars((string) $value) . "\"$selected>$text</option> \\";
100100
}
101-
$common_output[] = '</select> \
101+
$common_output[] = '</select> \
102102
</div> \
103103
<div class="form-group"> \
104104
<select name="severity[]" id="severity" class="form-control input-sm" multiple> \\';

0 commit comments

Comments
 (0)