@@ -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 | } |
@@ -41,9 +41,9 @@ |
||
41 | 41 | 'password' => 'required|confirmed|min:6', |
42 | 42 | ]); |
43 | 43 | |
44 | - if ( ! Hash::check($request->current_password, Auth::user()->password)) { |
|
44 | + if (!Hash::check($request->current_password, Auth::user()->password)) { |
|
45 | 45 | return response()->json( |
46 | - ['current_password' => ['The current password you provided is incorrect.']], 422 |
|
46 | + [ 'current_password' => [ 'The current password you provided is incorrect.' ] ], 422 |
|
47 | 47 | ); |
48 | 48 | } |
49 | 49 |
@@ -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 | } |