@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function register() |
| 20 | 20 | { |
| 21 | - $this->app->bind('azuresession', function () { |
|
| 21 | + $this->app->bind('azuresession', function() { |
|
| 22 | 22 | return Session::getInstance(); |
| 23 | 23 | }); |
| 24 | 24 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function boot() |
| 23 | 23 | { |
| 24 | - $this->app['auth']->viaRequest('api', function ($request) { |
|
| 24 | + $this->app['auth']->viaRequest('api', function($request) { |
|
| 25 | 25 | $userData = Session::has('ChocolateyWEB') ? Session::get('ChocolateyWEB') : null; |
| 26 | 26 | |
| 27 | 27 | return $request->path() == 'api/public/authentication/login' |
@@ -98,8 +98,9 @@ |
||
| 98 | 98 | { |
| 99 | 99 | $categories = []; |
| 100 | 100 | |
| 101 | - foreach (explode(',', $this->attributes['categories']) as $articleCategory) |
|
| 102 | - $categories[] = ArticleCategory::query()->where('link', $articleCategory)->first(); |
|
| 101 | + foreach (explode(',', $this->attributes['categories']) as $articleCategory) { |
|
| 102 | + $categories[] = ArticleCategory::query()->where('link', $articleCategory)->first(); |
|
| 103 | + } |
|
| 103 | 104 | |
| 104 | 105 | return $categories; |
| 105 | 106 | } |
@@ -52,11 +52,13 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | public function register(Request $request): JsonResponse |
| 54 | 54 | { |
| 55 | - if (strpos($request->json()->get('email'), '@') == false) |
|
| 56 | - return response()->json(['error' => 'registration_email'], 409); |
|
| 55 | + if (strpos($request->json()->get('email'), '@') == false) { |
|
| 56 | + return response()->json(['error' => 'registration_email'], 409); |
|
| 57 | + } |
|
| 57 | 58 | |
| 58 | - if (ChocolateyId::query()->where('mail', $request->json()->get('email'))->count() > 0) |
|
| 59 | - return response()->json(['error' => 'registration_email_in_use'], 409); |
|
| 59 | + if (ChocolateyId::query()->where('mail', $request->json()->get('email'))->count() > 0) { |
|
| 60 | + return response()->json(['error' => 'registration_email_in_use'], 409); |
|
| 61 | + } |
|
| 60 | 62 | |
| 61 | 63 | $userData = (new AccountController) |
| 62 | 64 | ->createUser($request, $request->json()->all(), true); |
@@ -98,8 +98,9 @@ |
||
| 98 | 98 | { |
| 99 | 99 | $shopCategories = []; |
| 100 | 100 | |
| 101 | - foreach (explode(',', $this->attributes['categories']) as $shopCategory) |
|
| 102 | - $shopCategories[] = ShopCategory::find($shopCategory)->category; |
|
| 101 | + foreach (explode(',', $this->attributes['categories']) as $shopCategory) { |
|
| 102 | + $shopCategories[] = ShopCategory::find($shopCategory)->category; |
|
| 103 | + } |
|
| 103 | 104 | |
| 104 | 105 | return $shopCategories; |
| 105 | 106 | } |
@@ -67,8 +67,9 @@ |
||
| 67 | 67 | { |
| 68 | 68 | $paymentMethods = []; |
| 69 | 69 | |
| 70 | - foreach (PaymentCategory::where('country_code', $countryCode)->get(['payment_type']) as $paymentMethod) |
|
| 71 | - $paymentMethods[] = $paymentMethod->payment_type; |
|
| 70 | + foreach (PaymentCategory::where('country_code', $countryCode)->get(['payment_type']) as $paymentMethod) { |
|
| 71 | + $paymentMethods[] = $paymentMethod->payment_type; |
|
| 72 | + } |
|
| 72 | 73 | |
| 73 | 74 | $this->paymentCategories = $paymentMethods; |
| 74 | 75 | } |
@@ -54,8 +54,9 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function likePhoto(Request $request, $photoId): JsonResponse |
| 56 | 56 | { |
| 57 | - if (PhotoLike::where('username', $request->user()->name)->where('photo_id', $photoId)->count() > 0) |
|
| 58 | - return response()->json(''); |
|
| 57 | + if (PhotoLike::where('username', $request->user()->name)->where('photo_id', $photoId)->count() > 0) { |
|
| 58 | + return response()->json(''); |
|
| 59 | + } |
|
| 59 | 60 | |
| 60 | 61 | (new PhotoLike)->store($photoId, $request->user()->name)->save(); |
| 61 | 62 | |
@@ -71,8 +72,9 @@ discard block |
||
| 71 | 72 | */ |
| 72 | 73 | public function unlikePhoto(Request $request, $photoId): JsonResponse |
| 73 | 74 | { |
| 74 | - if (PhotoLike::where('username', $request->user()->name)->where('photo_id', $photoId)->count() == 0) |
|
| 75 | - return response()->json(''); |
|
| 75 | + if (PhotoLike::where('username', $request->user()->name)->where('photo_id', $photoId)->count() == 0) { |
|
| 76 | + return response()->json(''); |
|
| 77 | + } |
|
| 76 | 78 | |
| 77 | 79 | PhotoLike::where('username', $request->user()->name)->where('photo_id', $photoId)->delete(); |
| 78 | 80 | |
@@ -50,8 +50,9 @@ |
||
| 50 | 50 | */ |
| 51 | 51 | public function render($request, Exception $e) |
| 52 | 52 | { |
| 53 | - if ($e instanceof NotFoundHttpException) |
|
| 54 | - return response(view('habbo-web')); |
|
| 53 | + if ($e instanceof NotFoundHttpException) { |
|
| 54 | + return response(view('habbo-web')); |
|
| 55 | + } |
|
| 55 | 56 | |
| 56 | 57 | return parent::render($request, $e); |
| 57 | 58 | } |
@@ -94,8 +94,9 @@ |
||
| 94 | 94 | { |
| 95 | 95 | $groups = GroupMember::where('user_id', $this->user->uniqueId)->get() ?? []; |
| 96 | 96 | |
| 97 | - foreach ($groups as $group) |
|
| 98 | - $this->groups[] = $group->guild; |
|
| 97 | + foreach ($groups as $group) { |
|
| 98 | + $this->groups[] = $group->guild; |
|
| 99 | + } |
|
| 99 | 100 | } |
| 100 | 101 | |
| 101 | 102 | /** |