@@ -18,10 +18,10 @@ |
||
| 18 | 18 | * |
| 19 | 19 | * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View |
| 20 | 20 | */ |
| 21 | - public function index(DeviceDataTable $dataTable, $group_id=-1) |
|
| 21 | + public function index(DeviceDataTable $dataTable, $group_id = -1) |
|
| 22 | 22 | { |
| 23 | 23 | $group_name = ""; |
| 24 | - if($group_id >= 0) { |
|
| 24 | + if ($group_id >= 0) { |
|
| 25 | 25 | $dataTable->addScope(new \App\DataTables\Scopes\DeviceGroup($group_id)); |
| 26 | 26 | $group_name = DeviceGroup::find($group_id)->name; |
| 27 | 27 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | foreach (Settings::get('alert.macros.group', []) as $macro => $value) { |
| 214 | - $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value); // this might need something more complex |
|
| 214 | + $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value); // this might need something more complex |
|
| 215 | 215 | if (!str_contains($macro, ' ')) { |
| 216 | 216 | $pattern = str_replace('macros.'.$macro, '('.$value.')', $pattern); |
| 217 | 217 | } |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | $related = $this->getRelation('deviceCountRelation')->first(); |
| 261 | 261 | |
| 262 | 262 | // then return the count directly |
| 263 | - return ($related) ? (int)$related->count : 0; |
|
| 263 | + return ($related) ? (int) $related->count : 0; |
|
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | /** |