@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * @var array |
| 13 | 13 | */ |
| 14 | - protected $dates = ['deleted_at']; |
|
| 14 | + protected $dates = [ 'deleted_at' ]; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * We do not want any timestamps. |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @var array |
| 27 | 27 | */ |
| 28 | - protected $guarded = []; |
|
| 28 | + protected $guarded = [ ]; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Sold guitars. |
@@ -107,6 +107,6 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function isSold() |
| 109 | 109 | { |
| 110 | - return ! is_null($this->sale); |
|
| 110 | + return !is_null($this->sale); |
|
| 111 | 111 | } |
| 112 | 112 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * @var array |
| 13 | 13 | */ |
| 14 | - protected $dates = ['deleted_at']; |
|
| 14 | + protected $dates = [ 'deleted_at' ]; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * We do not want any timestamps. |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @var array |
| 27 | 27 | */ |
| 28 | - protected $guarded = []; |
|
| 28 | + protected $guarded = [ ]; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Models of this make. |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | public function handle(PurchaseWasCreated $event) |
| 19 | 19 | { |
| 20 | 20 | $purchase = $event->purchase; |
| 21 | - if ($purchase->hasArrived() && $purchase->isPendingStorage() && ! $purchase->notifications()->count()) { |
|
| 21 | + if ($purchase->hasArrived() && $purchase->isPendingStorage() && !$purchase->notifications()->count()) { |
|
| 22 | 22 | $purchase->makeNotification(); |
| 23 | 23 | } |
| 24 | 24 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * @var array |
| 13 | 13 | */ |
| 14 | - protected $dates = ['deleted_at']; |
|
| 14 | + protected $dates = [ 'deleted_at' ]; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * We do not want any timestamps. |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @var array |
| 27 | 27 | */ |
| 28 | - protected $fillable = ['name', 'capacity', 'make_id', 'warehouse_id']; |
|
| 28 | + protected $fillable = [ 'name', 'capacity', 'make_id', 'warehouse_id' ]; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Warehouse the rack is in. |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | /** |
| 13 | 13 | * @var array |
| 14 | 14 | */ |
| 15 | - protected $dates = ['deleted_at']; |
|
| 15 | + protected $dates = [ 'deleted_at' ]; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * The attributes that are mass assignable. |
@@ -42,6 +42,6 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function getAvatarAttribute() |
| 44 | 44 | { |
| 45 | - return 'http://www.gravatar.com/avatar/'.md5($this->attributes['email']); |
|
| 45 | + return 'http://www.gravatar.com/avatar/'.md5($this->attributes[ 'email' ]); |
|
| 46 | 46 | } |
| 47 | 47 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * @var array |
| 13 | 13 | */ |
| 14 | - protected $dates = ['deleted_at']; |
|
| 14 | + protected $dates = [ 'deleted_at' ]; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * We do not want any timestamps. |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @var array |
| 27 | 27 | */ |
| 28 | - protected $guarded = []; |
|
| 28 | + protected $guarded = [ ]; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Make of this model. |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * @var array |
| 13 | 13 | */ |
| 14 | - protected $dates = ['deleted_at']; |
|
| 14 | + protected $dates = [ 'deleted_at' ]; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * We do not want any timestamps. |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @var array |
| 27 | 27 | */ |
| 28 | - protected $guarded = []; |
|
| 28 | + protected $guarded = [ ]; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Purchase performed by this shop. |
@@ -11,14 +11,14 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * @var array |
| 13 | 13 | */ |
| 14 | - protected $dates = ['deleted_at']; |
|
| 14 | + protected $dates = [ 'deleted_at' ]; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * The attributes that are not mass assignable. |
| 18 | 18 | * |
| 19 | 19 | * @var array |
| 20 | 20 | */ |
| 21 | - protected $guarded = []; |
|
| 21 | + protected $guarded = [ ]; |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
@@ -54,6 +54,6 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function dismiss() |
| 56 | 56 | { |
| 57 | - return $this->update(['dismissed' => true]); |
|
| 57 | + return $this->update([ 'dismissed' => true ]); |
|
| 58 | 58 | } |
| 59 | 59 | } |
@@ -27,14 +27,14 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @var array |
| 29 | 29 | */ |
| 30 | - protected $guarded = []; |
|
| 30 | + protected $guarded = [ ]; |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Date mutators. |
| 34 | 34 | * |
| 35 | 35 | * @var array |
| 36 | 36 | */ |
| 37 | - protected $dates = ['date_purchased', 'delivery_date', 'deleted_at']; |
|
| 37 | + protected $dates = [ 'date_purchased', 'delivery_date', 'deleted_at' ]; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Default date format. |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | if ($this->delivery_date->isFuture()) { |
| 90 | 90 | return self::UPCOMING; |
| 91 | 91 | } |
| 92 | - if ( ! $this->isPendingStorage()) { |
|
| 92 | + if (!$this->isPendingStorage()) { |
|
| 93 | 93 | return self::COMPLETED; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | { |
| 207 | 207 | $notification = $this->notifications()->create([ |
| 208 | 208 | 'icon' => 'flight_land', |
| 209 | - 'link' => '/purchases/' . $this->id, |
|
| 209 | + 'link' => '/purchases/'.$this->id, |
|
| 210 | 210 | 'message' => "Purchase of {$this->quantity} {$this->make->name} has arrived from {$this->supplier->name}, {$this->supplier->location}.", |
| 211 | 211 | ]); |
| 212 | 212 | |