Completed
Pull Request — master (#94)
by Brandon
08:20
created
app/Http/Controllers/DeviceController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $device = Device::findOrFail($id);
59 59
         
60
-        $charts = [];
60
+        $charts = [ ];
61 61
         foreach ($device->sensors as $sensor) {
62
-            $charts[$sensor->id] = Charts::create('line', 'highcharts')
62
+            $charts[ $sensor->id ] = Charts::create('line', 'highcharts')
63 63
                 ->title($sensor->name)
64 64
                 ->elementLabel($sensor->type)
65 65
                 ->labels($sensor->last_week_daily_avg_data->pluck('date'))
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         }
227 227
 
228 228
         return redirect()->route('device.index')
229
-            ->with('success','Device deleted successfully');
229
+            ->with('success', 'Device deleted successfully');
230 230
     }
231 231
     
232 232
     /**
@@ -242,6 +242,6 @@  discard block
 block discarded – undo
242 242
         $device->restore();
243 243
         
244 244
         return redirect()->route('device.show', $device->id)
245
-            ->with('success','Device restored successfully');
245
+            ->with('success', 'Device restored successfully');
246 246
     }
247 247
 }
Please login to merge, or discard this patch.
app/Sensor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     public function getLatestDataAttribute()
71 71
     {
72
-        return $this->hasOne('App\SensorData')->latest()->first() ?? (object)[];
72
+        return $this->hasOne('App\SensorData')->latest()->first() ?? (object) [ ];
73 73
     }
74 74
     
75 75
     /**
Please login to merge, or discard this patch.
app/Device.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      *
32 32
      * @var array
33 33
      */
34
-    protected $hidden = ['token'];
34
+    protected $hidden = [ 'token' ];
35 35
     
36 36
     /**
37 37
      * The attributes that are mass assignable.
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      *
51 51
      * @var array
52 52
      */
53
-    protected static $ignoreChangedAttributes = ['updated_at'];
53
+    protected static $ignoreChangedAttributes = [ 'updated_at' ];
54 54
     
55 55
     /**
56 56
      * The attributes to log in the Activity Log
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function getSiteAttribute()
93 93
     {
94
-        return $this->location->site ?? (object)[];
94
+        return $this->location->site ?? (object) [ ];
95 95
     }
96 96
     
97 97
     /**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         else
152 152
             $time = new Carbon($value, 'UTC');
153 153
         
154
-        $this->attributes['open_time'] = $time->format('H:i:s');
154
+        $this->attributes[ 'open_time' ] = $time->format('H:i:s');
155 155
     }
156 156
     
157 157
     /**
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         else
174 174
             $time = new Carbon($value, 'UTC');
175 175
         
176
-        $this->attributes['close_time'] = $time->format('H:i:s');
176
+        $this->attributes[ 'close_time' ] = $time->format('H:i:s');
177 177
     }
178 178
     
179 179
     /**
Please login to merge, or discard this patch.