@@ -25,8 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getUserHead(Request $request) |
27 | 27 | { |
28 | - return redirect(Config::get('chocolatey.imaging').'avatarimage?figure='.($request->has('figure') ? $request->input('figure') : |
|
29 | - User::where('username', $request->input('user'))->first()->figureString).'&size=l&headonly=1'); |
|
28 | + return redirect(Config::get('chocolatey.imaging') . 'avatarimage?figure=' . ($request->has('figure') ? $request->input('figure') : User::where('username', $request->input('user'))->first()->figureString) . '&size=l&headonly=1'); |
|
30 | 29 | } |
31 | 30 | |
32 | 31 | /** |
@@ -39,7 +38,7 @@ discard block |
||
39 | 38 | */ |
40 | 39 | public function getUserBody(string $figure) |
41 | 40 | { |
42 | - return redirect(Config::get('chocolatey.imaging')."avatar/{$figure}"); |
|
41 | + return redirect(Config::get('chocolatey.imaging') . "avatar/{$figure}"); |
|
43 | 42 | } |
44 | 43 | |
45 | 44 | /** |
@@ -122,7 +122,7 @@ |
||
122 | 122 | */ |
123 | 123 | public function hasSession() |
124 | 124 | { |
125 | - return (bool) Session::get(Config::get('chocolatey.security.session')); |
|
125 | + return (bool)Session::get(Config::get('chocolatey.security.session')); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function boot() |
21 | 21 | { |
22 | - $this->app['auth']->viaRequest('api', function ($request) { |
|
22 | + $this->app['auth']->viaRequest('api', function($request) { |
|
23 | 23 | return User::getInstance()->getUser(); |
24 | 24 | }); |
25 | 25 | } |
@@ -59,7 +59,7 @@ |
||
59 | 59 | */ |
60 | 60 | public function getTrustedDevicesAttribute(): array |
61 | 61 | { |
62 | - return TrustedDevice::where('user_id', $this->attributes['user_id'])->get(['ip_address'])->map(function ($item) { |
|
62 | + return TrustedDevice::where('user_id', $this->attributes['user_id'])->get(['ip_address'])->map(function($item) { |
|
63 | 63 | return $item->ip_address; |
64 | 64 | })->toArray(); |
65 | 65 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function register() |
20 | 20 | { |
21 | - $this->app->bind('chocovalidate', function () { |
|
21 | + $this->app->bind('chocovalidate', function() { |
|
22 | 22 | return Validation::getInstance(); |
23 | 23 | }); |
24 | 24 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | 'block_friendrequests' => $request->json()->get('friendRequestEnabled') == false ? '1' : '0', |
79 | 79 | ]); |
80 | 80 | |
81 | - foreach ((array) $request->json()->all() as $setting => $value) { |
|
81 | + foreach ((array)$request->json()->all() as $setting => $value) { |
|
82 | 82 | UserPreferences::find(UserFacade::getUser()->uniqueId)->update([$setting => $value == true ? '1' : '0']); |
83 | 83 | } |
84 | 84 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | $token = Mail::store($userInfo['email'], 'public/registration/activate'); |
146 | 146 | |
147 | - Mail::send(['email' => $userInfo['email'], 'name' => $userName, 'url' => "/activate/{$token}", 'subject' => 'Welcome to '.Config::get('chocolatey.hotelName')]); |
|
147 | + Mail::send(['email' => $userInfo['email'], 'name' => $userName, 'url' => "/activate/{$token}", 'subject' => 'Welcome to ' . Config::get('chocolatey.hotelName')]); |
|
148 | 148 | |
149 | 149 | return UserFacade::setSession((new User())->store($userName, $userInfo['email'], $request->ip(), $newUser)); |
150 | 150 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | { |
163 | 163 | $partialName = explode(' ', (new Alliteration())->getName()); |
164 | 164 | |
165 | - return strtolower($partialName[0].strstr($userMail, '@', true).$partialName[1]); |
|
165 | + return strtolower($partialName[0] . strstr($userMail, '@', true) . $partialName[1]); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $token = Mail::store(UserFacade::getUser()->email, 'public/registration/activate'); |
212 | 212 | |
213 | 213 | Mail::send(['name' => UserFacade::getUser()->name, 'email' => $request->user()->email, |
214 | - 'url' => "/activate/{$token}", 'subject' => 'Welcome to '.Config::get('chocolatey.hotelName'), |
|
214 | + 'url' => "/activate/{$token}", 'subject' => 'Welcome to ' . Config::get('chocolatey.hotelName'), |
|
215 | 215 | ]); |
216 | 216 | |
217 | 217 | return response(null); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getIdAttribute(): string |
56 | 56 | { |
57 | - return (string) $this->attributes['id']; |
|
57 | + return (string)$this->attributes['id']; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function getLikesAttribute(): array |
108 | 108 | { |
109 | - return array_map(function (array $item) { |
|
109 | + return array_map(function(array $item) { |
|
110 | 110 | return $item['username']; |
111 | 111 | }, PhotoLike::query()->select('username')->where('photo_id', $this->attributes['id'])->get(['username'])->toArray()); |
112 | 112 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | */ |
47 | 47 | public function checkWords(string $needle): bool |
48 | 48 | { |
49 | - return count(array_filter(Config::get('chocolatey.invalid'), function ($illegal) use ($needle) { |
|
49 | + return count(array_filter(Config::get('chocolatey.invalid'), function($illegal) use ($needle) { |
|
50 | 50 | return stripos($needle, $illegal) !== false; |
51 | 51 | })) == 0; |
52 | 52 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public function send(array $configuration, string $view = 'habbo-web-mail.confirm-mail') |
29 | 29 | { |
30 | 30 | if (Config::get('mail.enable')) { |
31 | - MailFacade::send($view, $configuration, function ($message) use ($configuration) { |
|
31 | + MailFacade::send($view, $configuration, function($message) use ($configuration) { |
|
32 | 32 | $message->from(Config::get('mail.from.address'), Config::get('mail.from.name')); |
33 | 33 | $message->to($configuration['email'])->subject($configuration['subject']); |
34 | 34 | }); |