@@ -29,19 +29,19 @@ discard block |
||
29 | 29 | /** |
30 | 30 | * @var array |
31 | 31 | */ |
32 | - protected $dates = ['deleted_at']; |
|
32 | + protected $dates = [ 'deleted_at' ]; |
|
33 | 33 | /** |
34 | 34 | * The attributes that are mass assignable. |
35 | 35 | * |
36 | 36 | * @var array |
37 | 37 | */ |
38 | - protected $fillable = ['name']; |
|
38 | + protected $fillable = [ 'name' ]; |
|
39 | 39 | |
40 | 40 | public static function boot() |
41 | 41 | { |
42 | 42 | parent::boot(); |
43 | 43 | |
44 | - static::deleting(function (Warehouse $warehouse) { |
|
44 | + static::deleting(function(Warehouse $warehouse) { |
|
45 | 45 | $warehouse->racks()->delete(); |
46 | 46 | }); |
47 | 47 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | public function addOrUpdateRack($rack) |
140 | 140 | { |
141 | 141 | (array_has($rack, 'id')) ? |
142 | - $this->racks()->find($rack['id'])->update($rack) : $this->addRack($rack); |
|
142 | + $this->racks()->find($rack[ 'id' ])->update($rack) : $this->addRack($rack); |
|
143 | 143 | |
144 | 144 | return $this; |
145 | 145 | } |
@@ -49,19 +49,19 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * @var array |
51 | 51 | */ |
52 | - protected $dates = ['deleted_at']; |
|
52 | + protected $dates = [ 'deleted_at' ]; |
|
53 | 53 | /** |
54 | 54 | * The attributes that are not mass assignable. |
55 | 55 | * |
56 | 56 | * @var array |
57 | 57 | */ |
58 | - protected $guarded = []; |
|
58 | + protected $guarded = [ ]; |
|
59 | 59 | |
60 | 60 | public static function boot() |
61 | 61 | { |
62 | 62 | parent::boot(); |
63 | 63 | |
64 | - static::deleting(function (Guitar $guitar) { |
|
64 | + static::deleting(function(Guitar $guitar) { |
|
65 | 65 | $guitar->sale->delete(); |
66 | 66 | }); |
67 | 67 | } |
@@ -146,6 +146,6 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function isSold() |
148 | 148 | { |
149 | - return ! is_null($this->sale); |
|
149 | + return !is_null($this->sale); |
|
150 | 150 | } |
151 | 151 | } |
@@ -32,19 +32,19 @@ |
||
32 | 32 | /** |
33 | 33 | * @var array |
34 | 34 | */ |
35 | - protected $dates = ['deleted_at']; |
|
35 | + protected $dates = [ 'deleted_at' ]; |
|
36 | 36 | /** |
37 | 37 | * The attributes that are not mass assignable. |
38 | 38 | * |
39 | 39 | * @var array |
40 | 40 | */ |
41 | - protected $guarded = []; |
|
41 | + protected $guarded = [ ]; |
|
42 | 42 | |
43 | 43 | public static function boot() |
44 | 44 | { |
45 | 45 | parent::boot(); |
46 | 46 | |
47 | - static::deleting(function (Make $make) { |
|
47 | + static::deleting(function(Make $make) { |
|
48 | 48 | $make->models()->delete(); |
49 | 49 | $make->racks()->delete(); |
50 | 50 | $make->purchases()->delete(); |
@@ -34,19 +34,19 @@ |
||
34 | 34 | /** |
35 | 35 | * @var array |
36 | 36 | */ |
37 | - protected $dates = ['deleted_at']; |
|
37 | + protected $dates = [ 'deleted_at' ]; |
|
38 | 38 | /** |
39 | 39 | * The attributes that are not mass assignable. |
40 | 40 | * |
41 | 41 | * @var array |
42 | 42 | */ |
43 | - protected $guarded = []; |
|
43 | + protected $guarded = [ ]; |
|
44 | 44 | |
45 | 45 | public static function boot() |
46 | 46 | { |
47 | 47 | parent::boot(); |
48 | 48 | |
49 | - static::deleting(function (Model $model) { |
|
49 | + static::deleting(function(Model $model) { |
|
50 | 50 | $model->guitars()->delete(); |
51 | 51 | }); |
52 | 52 | } |