Completed
Push — development ( bc6f72...362845 )
by Claudio
05:07 queued 02:33
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
     }
@@ -90,8 +93,9 @@  discard block
 block discarded – undo
90 93
      */
91 94
     public function getPhotos(int $userId): JsonResponse
92 95
     {
93
-        if (Photo::where('creator_id', $userId)->count() == 0)
94
-            return response()->json([]);
96
+        if (Photo::where('creator_id', $userId)->count() == 0) {
97
+                    return response()->json([]);
98
+        }
95 99
 
96 100
         $userPhotos = Photo::where('creator_id', $userId)->get();
97 101
 
Please login to merge, or discard this patch.