Completed
Push — development ( 88b29e...bc6f72 )
by Claudio
02:47
created
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(null, 404);
30
+        if ($userData == null) {
31
+                    return response()->json(null, 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(null, 404);
52
+        if ($userData == null) {
53
+                    return response()->json(null, 404);
54
+        }
53 55
 
54 56
         $userPreferences = UserPreferences::find($userData->uniqueId);
55 57
 
56
-        if ($userPreferences != null && $userPreferences->profileVisible == '0')
57
-            return response()->json(null, 404);
58
+        if ($userPreferences != null && $userPreferences->profileVisible == '0') {
59
+                    return response()->json(null, 404);
60
+        }
58 61
 
59 62
         return response()->json(new UserProfile($userData));
60 63
     }
@@ -91,8 +94,9 @@  discard block
 block discarded – undo
91 94
      */
92 95
     public function getPhotos(Request $request, int $userId): JsonResponse
93 96
     {
94
-        if (Photo::where('creator_id', $userId)->count() == 0)
95
-            return response()->json([]);
97
+        if (Photo::where('creator_id', $userId)->count() == 0) {
98
+                    return response()->json([]);
99
+        }
96 100
 
97 101
         $userPhotos = Photo::where('creator_id', $userId)->get();
98 102
 
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('users', 'DESC')->orderBy('score', 'DESC')->limit(50)->get()) as $room)
32
-            $room->leaderboardRank = $leaderRank++;
31
+        foreach (($leaderBoard = Room::orderBy('users', 'DESC')->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.