Completed
Push — development ( 38187f...0de0e2 )
by Claudio
06:16 queued 04:04
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('', 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.
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.