Completed
Push — master ( 06cae1...fd05d6 )
by
unknown
20s
created
app/Http/Controllers/DeviceController.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
         {
80 80
             $sites = $this->site_m->orderedSitesBy($location->site_id);
81 81
             $locations = $this->location_m->orderedSiteLocationsBy($location->site_id, $device->location_id);
82
-        }
83
-        else
82
+        } else
84 83
         {
85 84
             $locations = null;
86 85
             $sites = $this->site_m->all();
@@ -141,8 +140,7 @@  discard block
 block discarded – undo
141 140
             //Create a new site
142 141
             $siteName = $request->input('new_site_name');
143 142
             $site_id = $this->site_m->createSite($siteName);
144
-        }
145
-        else
143
+        } else
146 144
         {
147 145
             $site_id = $request->input('site');
148 146
         }
@@ -154,8 +152,7 @@  discard block
 block discarded – undo
154 152
             //Create a new location
155 153
             $locationName = $request->input('new_location_name');
156 154
             $location_id = $this->location_m->createLocation($locationName, $site_id);
157
-        }
158
-        else
155
+        } else
159 156
         {
160 157
             $location_id = $request->input('location');
161 158
         }
@@ -185,8 +182,7 @@  discard block
 block discarded – undo
185 182
         {
186 183
             //If the user was already deleted then permanently delete it
187 184
             $this->device_m->destroy($id);
188
-        }
189
-        else
185
+        } else
190 186
         {
191 187
             //Remove the location from the device
192 188
             $oldLocation_id = $device->location_id;
@@ -232,8 +228,7 @@  discard block
 block discarded – undo
232 228
             {
233 229
                 //Get the site connected to the location and delete it
234 230
                 $this->site_m->findOrFail($site_id)->delete();
235
-            }
236
-            else
231
+            } else
237 232
             {
238 233
                 //Delete the location that isn't used anymore
239 234
                 $oldLocation->delete();
Please login to merge, or discard this patch.
app/Http/Controllers/ApiController.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     /**
15 15
      * Creates a json response for all the devices.
16 16
      *
17
-     * @return Response
17
+     * @return \Illuminate\Http\JsonResponse
18 18
      */    
19 19
     public function index()
20 20
     {
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * Creates a json response for a specifc device.
26 26
      *
27 27
      * @param  Device  $device
28
-     * @return Response
28
+     * @return \Illuminate\Http\JsonResponse
29 29
      */    
30 30
     public function show(Device $device)
31 31
     {
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * Updates the status of a device.
37 37
      *
38 38
      * @param  Request  $request
39
-     * @return Response
39
+     * @return \Illuminate\Http\JsonResponse
40 40
      */
41 41
     public function update(Request $request)
42 42
     {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * Registers a new device.
108 108
      *
109 109
      * @param  Request  $request
110
-     * @return Response
110
+     * @return \Illuminate\Http\JsonResponse
111 111
      */
112 112
     public function register(Request $request)
113 113
     {
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      * Updates the image for a device.
165 165
      *
166 166
      * @param  Request  $request
167
-     * @return Response
167
+     * @return \Illuminate\Http\JsonResponse
168 168
      */
169 169
     public function image(Request $request) {
170 170
         // Validate the request.
Please login to merge, or discard this patch.