@@ -57,9 +57,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -69,7 +69,7 @@ |
||
| 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 | /** |
@@ -31,7 +31,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | /** |