@@ -14,7 +14,7 @@ |
||
| 14 | 14 | public function register() |
| 15 | 15 | { |
| 16 | 16 | // Register Mailing Services |
| 17 | - $this->app->singleton('mailer', function ($app) { |
|
| 17 | + $this->app->singleton('mailer', function($app) { |
|
| 18 | 18 | return $app->loadComponent('mail', 'Illuminate\Mail\MailServiceProvider', 'mailer'); |
| 19 | 19 | }); |
| 20 | 20 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | public function send(array $configuration, string $view = 'habbo-web-mail.confirm-mail') |
| 45 | 45 | { |
| 46 | 46 | try { |
| 47 | - Mail::send($view, $configuration, function ($message) use ($configuration) { |
|
| 47 | + Mail::send($view, $configuration, function($message) use ($configuration) { |
|
| 48 | 48 | $message->from(Config::get('chocolatey.contact'), Config::get('chocolatey.name')); |
| 49 | 49 | $message->to($configuration['mail']); |
| 50 | 50 | }); |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | public function getTrustedDevicesAttribute(): array |
| 69 | 69 | { |
| 70 | 70 | return TrustedDevice::where('user_id', $this->attributes['user_id'])->get(['ip_address']) |
| 71 | - ->map(function ($item) { |
|
| 71 | + ->map(function($item) { |
|
| 72 | 72 | return $item->ip_address; |
| 73 | 73 | })->toArray(); |
| 74 | 74 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function register() |
| 20 | 20 | { |
| 21 | - $this->app->bind('chocosession', function () { |
|
| 21 | + $this->app->bind('chocosession', function() { |
|
| 22 | 22 | return Session::getInstance(); |
| 23 | 23 | }); |
| 24 | 24 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function boot() |
| 25 | 25 | { |
| 26 | - $this->app['auth']->viaRequest('api', function ($request) { |
|
| 26 | + $this->app['auth']->viaRequest('api', function($request) { |
|
| 27 | 27 | return $request->path() == 'api/public/authentication/login' |
| 28 | 28 | ? $this->auth($request) : $this->recover($request); |
| 29 | 29 | }); |
@@ -24,8 +24,7 @@ |
||
| 24 | 24 | public function getUserHead(Request $request) |
| 25 | 25 | { |
| 26 | 26 | return redirect(Config::get('chocolatey.imaging') . 'avatarimage?figure=' |
| 27 | - . ($request->has('figure') ? $request->input('figure') : |
|
| 28 | - User::where('username', $request->input('user'))->first()->figureString) |
|
| 27 | + . ($request->has('figure') ? $request->input('figure') : User::where('username', $request->input('user'))->first()->figureString) |
|
| 29 | 28 | . '&size=l&headonly=1'); |
| 30 | 29 | } |
| 31 | 30 | |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | $categoryPage = strstr(strrev($articleCategory), '_', true); |
| 30 | 30 | |
| 31 | - return $articleCategory == 'front' ? $this->front() : |
|
| 32 | - $this->category($countryId, $category, $categoryPage, |
|
| 31 | + return $articleCategory == 'front' ? $this->front() : $this->category($countryId, $category, $categoryPage, |
|
| 33 | 32 | $categoryPage == 1 ? 0 : (10 * ($categoryPage - 1))); |
| 34 | 33 | } |
| 35 | 34 | |
@@ -58,7 +57,7 @@ discard block |
||
| 58 | 57 | protected function category(string $countryId, ArticleCategory $category, int $categoryPage, int $start): Response |
| 59 | 58 | { |
| 60 | 59 | $articles = Article::where('id', '>=', $start) |
| 61 | - ->limit(10)->orderBy('id', 'DESC')->get()->filter(function ($item) use ($category) { |
|
| 60 | + ->limit(10)->orderBy('id', 'DESC')->get()->filter(function($item) use ($category) { |
|
| 62 | 61 | return $category->name == 'all' || in_array($category, $item->categories); |
| 63 | 62 | }); |
| 64 | 63 | |
@@ -87,7 +86,7 @@ discard block |
||
| 87 | 86 | if (($article = Article::find(strstr($articleName, '_', true))) == null) |
| 88 | 87 | return response()->json(null, 404); |
| 89 | 88 | |
| 90 | - $related = ($latest = Article::all())->filter(function ($item) use ($article) { |
|
| 89 | + $related = ($latest = Article::all())->filter(function($item) use ($article) { |
|
| 91 | 90 | return in_array($article->categories[0], $item->categories); |
| 92 | 91 | }); |
| 93 | 92 | |
@@ -235,7 +235,7 @@ |
||
| 235 | 235 | */ |
| 236 | 236 | public function getTraitsAttribute(): array |
| 237 | 237 | { |
| 238 | - if(array_key_exists('rank', $this->attributes) && $this->attributes['rank'] >= 6) |
|
| 238 | + if (array_key_exists('rank', $this->attributes) && $this->attributes['rank'] >= 6) |
|
| 239 | 239 | return ["STAFF"]; |
| 240 | 240 | |
| 241 | 241 | return $this->traits; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | protected function filterName(string $userName):bool |
| 28 | 28 | { |
| 29 | - return count(array_filter(Config::get('chocolatey.invalid'), function ($username) use ($userName) { |
|
| 29 | + return count(array_filter(Config::get('chocolatey.invalid'), function($username) use ($userName) { |
|
| 30 | 30 | return strpos($userName, $username) !== false; |
| 31 | 31 | })) == 0; |
| 32 | 32 | } |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | 'block_friendrequests' => $request->json()->get('friendRequestEnabled') == false |
| 142 | 142 | ]); |
| 143 | 143 | |
| 144 | - foreach((array)$request->json()->all() as $setting => $value) |
|
| 144 | + foreach ((array)$request->json()->all() as $setting => $value) |
|
| 145 | 145 | UserPreferences::find($request->user()->uniqueId)->update([$setting => $value == true ? '1' : '0']); |
| 146 | 146 | |
| 147 | 147 | return response()->json(null); |