Completed
Push — development ( e85e87...4a3a46 )
by Claudio
02:21
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/Http/Controllers/ArticleController.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,9 @@
 block discarded – undo
74 74
     {
75 75
         $articleContent = Article::find(substr($articleName, 0, strpos($articleName, '_')));
76 76
 
77
-        if ($articleContent == null)
78
-            return response()->json('', 404);
77
+        if ($articleContent == null) {
78
+                    return response()->json('', 404);
79
+        }
79 80
 
80 81
         return response(view('habbo-web-news.articles-view', [
81 82
             'article' => $articleContent,
Please login to merge, or discard this patch.
app/Http/Controllers/ProfileController.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $userData = User::where('username', $request->input('name'))->first();
29 29
 
30
-        if ($userData == null)
31
-            return response()->json('', 404);
30
+        if ($userData == null) {
31
+                    return response()->json('', 404);
32
+        }
32 33
 
33 34
         $userPreferences = UserPreferences::find($userData->uniqueId);
34 35
 
@@ -48,13 +49,15 @@  discard block
 block discarded – undo
48 49
     {
49 50
         $userData = User::find($userId);
50 51
 
51
-        if ($userData == null)
52
-            return response()->json('', 404);
52
+        if ($userData == null) {
53
+                    return response()->json('', 404);
54
+        }
53 55
 
54 56
         $userPreferences = UserPreferences::find($userData->uniqueId);
55 57
 
56
-        if ($userPreferences != null && $userPreferences->profileVisible == '0')
57
-            return response()->json('', 404);
58
+        if ($userPreferences != null && $userPreferences->profileVisible == '0') {
59
+                    return response()->json('', 404);
60
+        }
58 61
 
59 62
         return response()->json(new UserProfile($userData));
60 63
     }
@@ -90,8 +93,9 @@  discard block
 block discarded – undo
90 93
      */
91 94
     public function getPhotos(Request $request): JsonResponse
92 95
     {
93
-        if (Photo::where('creator_id', $request->user()->uniqueId)->count() == 0)
94
-            return response()->json([]);
96
+        if (Photo::where('creator_id', $request->user()->uniqueId)->count() == 0) {
97
+                    return response()->json([]);
98
+        }
95 99
 
96 100
         $userPhotos = Photo::where('creator_id', $request->user()->uniqueId)->get();
97 101
 
Please login to merge, or discard this patch.
app/Http/Controllers/RoomsController.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@
 block discarded – undo
28 28
     {
29 29
         $leaderRank = 1;
30 30
 
31
-        foreach (($leaderBoard = Room::orderBy('score', 'DESC')->limit(50)->get()) as $room)
32
-            $room->leaderboardRank = $leaderRank++;
31
+        foreach (($leaderBoard = Room::orderBy('score', 'DESC')->limit(50)->get()) as $room) {
32
+                    $room->leaderboardRank = $leaderRank++;
33
+        }
33 34
 
34 35
         return response()->json($leaderBoard, 200, array(), JSON_UNESCAPED_SLASHES);
35 36
     }
Please login to merge, or discard this patch.