Completed
Push — development ( 4247a7...abd435 )
by Claudio
02:24
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 || $userData->isBanned)
31
-            return response()->json(null, 404);
30
+        if ($userData == null || $userData->isBanned) {
31
+                    return response()->json(null, 404);
32
+        }
32 33
 
33 34
         $userPreferences = UserPreferences::find($userData->uniqueId);
34 35
 
@@ -49,13 +50,15 @@  discard block
 block discarded – undo
49 50
     {
50 51
         $userData = User::find($userId);
51 52
 
52
-        if ($userData == null || $userData->isBanned)
53
-            return response()->json(null, 404);
53
+        if ($userData == null || $userData->isBanned) {
54
+                    return response()->json(null, 404);
55
+        }
54 56
 
55 57
         $userPreferences = UserPreferences::find($userData->uniqueId);
56 58
 
57
-        if ($userPreferences != null && $userPreferences->profileVisible == '0')
58
-            return response()->json(null, 404);
59
+        if ($userPreferences != null && $userPreferences->profileVisible == '0') {
60
+                    return response()->json(null, 404);
61
+        }
59 62
 
60 63
         return response()->json(new UserProfile($userData));
61 64
     }
@@ -91,8 +94,9 @@  discard block
 block discarded – undo
91 94
      */
92 95
     public function getPhotos(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.