Completed
Push — master ( ffe767...90fa06 )
by Brandon
02:24
created
app/Http/Controllers/DeviceController.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @param  Request  $request
83 83
      * @param  string  $id
84
-     * @return Response
84
+     * @return \Illuminate\Http\RedirectResponse
85 85
      */
86 86
     public function update(Request $request, $id)
87 87
     {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      *
146 146
      * @param  Request  $request
147 147
      * @param  string  $id
148
-     * @return Response
148
+     * @return \Illuminate\Http\RedirectResponse
149 149
      */
150 150
     public function destroy(Request $request, $id)
151 151
     {
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,10 +68,11 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $device = Device::findOrFail($id);
70 70
         $location = Location::where('id', $device->location_id)->first();
71
-        if ($location)
72
-            $site = Site::where('id', $location->site_id)->first();
73
-        else
74
-            $site = null;
71
+        if ($location) {
72
+                    $site = Site::where('id', $location->site_id)->first();
73
+        } else {
74
+                    $site = null;
75
+        }
75 76
 
76 77
         return view('device.edit', ['device' => $device, 'location' => $location, 'site' => $site]);
77 78
     }
@@ -155,8 +156,7 @@  discard block
 block discarded – undo
155 156
         {
156 157
             // if the user was already deleted then permananetly delete it
157 158
             Device::destroy($id);
158
-        }
159
-        else
159
+        } else
160 160
         {
161 161
             //Remove the location from the device
162 162
             $oldLocation_id = $device->location_id;
Please login to merge, or discard this patch.