Completed
Pull Request — master (#26)
by
unknown
02:01
created
app/Http/Controllers/DeviceController.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@  discard block
 block discarded – undo
85 85
                                             ->where('site_id', '=', $location->site_id)
86 86
                                             ->orderByRaw(DB::raw("(id = " . $device->location_id . ") DESC"))
87 87
                                             ->get();
88
-        }
89
-        else
88
+        } else
90 89
         {
91 90
             $locations = null;
92 91
             $sites = Site::all();
@@ -150,8 +149,7 @@  discard block
 block discarded – undo
150 149
             $site->name = $siteName;
151 150
             $site->save();
152 151
             $site_id = $site->id;
153
-        }
154
-        else
152
+        } else
155 153
         {
156 154
             $site_id = $request->input('site');
157 155
         }
@@ -167,8 +165,7 @@  discard block
 block discarded – undo
167 165
             $location->site_id = $site_id;
168 166
             $location->save();
169 167
             $location_id = $location->id;
170
-        }
171
-        else
168
+        } else
172 169
         {
173 170
             $location_id = $request->input('location');
174 171
         }
@@ -248,8 +245,7 @@  discard block
 block discarded – undo
248 245
             {
249 246
                 //Get the site connected to the location and delete it
250 247
                 Site::where('id', '=', $site_id)->delete();
251
-            }
252
-            else
248
+            } else
253 249
             {
254 250
                 //Delete the location that isn't used anymore
255 251
                 Location::where('id', '=', $oldLocationID)->delete();
Please login to merge, or discard this patch.