Completed
Push — device-groups ( 4e4afd...62ff22 )
by Tony
02:49
created
app/Api/Controllers/DashboardWidgetController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      */
74 74
     public function show(Request $request, $id)
75 75
     {
76
-        $widget  = Widgets::find($id);
76
+        $widget = Widgets::find($id);
77 77
         return array('widget' => $widget);
78 78
     }
79 79
 
Please login to merge, or discard this patch.
app/Http/Controllers/DeviceController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
app/Models/DeviceGroup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         }
170 170
 
171 171
         foreach (Settings::get('alert.macros.group', []) as $macro => $value) {
172
-            $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value);  // this might need something more complex
172
+            $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value); // this might need something more complex
173 173
             if (!str_contains($macro, ' ')) {
174 174
                 $pattern = str_replace('macros.'.$macro, '('.$value.')', $pattern);
175 175
             }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         }
225 225
 
226 226
         // fill in parameters
227
-        foreach ((array)$this->params as $value) {
227
+        foreach ((array) $this->params as $value) {
228 228
             if (!is_numeric($value) && !starts_with($value, "'")) {
229 229
                 $value = "'".$value."'";
230 230
             }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         $related = $this->getRelation('deviceCountRelation')->first();
252 252
 
253 253
         // then return the count directly
254
-        return ($related) ? (int)$related->count : 0;
254
+        return ($related) ? (int) $related->count : 0;
255 255
     }
256 256
 
257 257
     /**
Please login to merge, or discard this patch.