@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * |
13 | 13 | * @var array |
14 | 14 | */ |
15 | - protected $availableIncludes = ['purchase', 'sale']; |
|
15 | + protected $availableIncludes = [ 'purchase', 'sale' ]; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Turn this item object into a generic array. |
@@ -47,16 +47,16 @@ discard block |
||
47 | 47 | 'id' => $guitar->isSold() ? $guitar->sale->id : null, |
48 | 48 | 'name' => $guitar->isSold() ? $guitar->sale->name : null, |
49 | 49 | 'address' => $guitar->isSold() ? $guitar->sale->address : null, |
50 | - 'date' => $guitar->isSold() ? (string)$guitar->sale->created_at->toFormattedDateString() : null, |
|
50 | + 'date' => $guitar->isSold() ? (string) $guitar->sale->created_at->toFormattedDateString() : null, |
|
51 | 51 | ], |
52 | 52 | 'make_id' => $guitar->make_id, |
53 | 53 | 'model_id' => $guitar->model_id, |
54 | 54 | 'rack_id' => $guitar->rack_id, |
55 | 55 | 'colour' => $guitar->colour, |
56 | - 'price' => (float)$guitar->price, |
|
57 | - 'damaged' => (bool)$guitar->damaged, |
|
56 | + 'price' => (float) $guitar->price, |
|
57 | + 'damaged' => (bool) $guitar->damaged, |
|
58 | 58 | 'condition' => $guitar->condition, |
59 | - 'sold' => (bool)$guitar->isSold(), |
|
59 | + 'sold' => (bool) $guitar->isSold(), |
|
60 | 60 | ]; |
61 | 61 | } |
62 | 62 | } |
@@ -17,15 +17,15 @@ |
||
17 | 17 | public function transform(Notification $notification) |
18 | 18 | { |
19 | 19 | return [ |
20 | - 'id' => (int)$notification->id, |
|
21 | - 'icon' => (string)$notification->icon, |
|
22 | - 'link' => (string)$notification->link, |
|
23 | - 'message' => (string)$notification->message, |
|
24 | - 'dismissed' => (bool)$notification->dismissed, |
|
20 | + 'id' => (int) $notification->id, |
|
21 | + 'icon' => (string) $notification->icon, |
|
22 | + 'link' => (string) $notification->link, |
|
23 | + 'message' => (string) $notification->message, |
|
24 | + 'dismissed' => (bool) $notification->dismissed, |
|
25 | 25 | 'created' => [ |
26 | 26 | 'timestamp' => $notification->created_at->getTimestamp(), |
27 | - 'date' => (string)$notification->created_at->toFormattedDateString(), |
|
28 | - 'readable' => (string)$notification->created_at->diffForHumans(), |
|
27 | + 'date' => (string) $notification->created_at->toFormattedDateString(), |
|
28 | + 'readable' => (string) $notification->created_at->diffForHumans(), |
|
29 | 29 | ], |
30 | 30 | ]; |
31 | 31 | } |
@@ -11,14 +11,14 @@ |
||
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 | * Guitar that was sold. |