Completed
Push — development ( 9b7a91...88b29e )
by Claudio
02:33
created
app/Providers/SessionServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Providers/AuthServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
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'
Please login to merge, or discard this patch.
app/Models/User.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -233,8 +233,9 @@
 block discarded – undo
233 233
      */
234 234
     public function getTrustedAttribute(): bool
235 235
     {
236
-        if (UserSecurity::find($this->attributes['id']) == null)
237
-            return true;
236
+        if (UserSecurity::find($this->attributes['id']) == null) {
237
+                    return true;
238
+        }
238 239
 
239 240
         return in_array($this->trusted, UserSecurity::find($this->attributes['id'])->trustedDevices);
240 241
     }
Please login to merge, or discard this patch.
app/Models/Article.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,9 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Models/UserFriend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
      *
89 89
      * @return User
90 90
      */
91
-    protected function getUserFriendData(): ?User
91
+    protected function getUserFriendData(): ? User
92 92
     {
93 93
         return User::find($this->attributes['user_two_id']);
94 94
     }
Please login to merge, or discard this patch.
app/Http/Controllers/LoginController.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,11 +52,13 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
app/Models/ShopItem.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,9 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Models/ShopInventory.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,9 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Http/Controllers/PublicPhotosController.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.