Passed
Push — master ( 8f1fcd...bdbf41 )
by Innocent
04:12 queued 01:11
created
routes/source.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@
 block discarded – undo
3 3
 use FaithGen\SDK\Http\Controllers\MinistryController;
4 4
 use Illuminate\Support\Facades\Route;
5 5
 
6
-Route::name('ministry.')->prefix('ministry/')->group(function () {
7
-    Route::get('users', [MinistryController::class, 'users']);
8
-    Route::put('social-link', [MinistryController::class, 'saveSocialLink']);
9
-    Route::post('profile', [MinistryController::class, 'updateProfile']);
10
-    Route::post('photo', [MinistryController::class, 'updatePhoto']);
11
-    Route::post('password', [MinistryController::class, 'updatePassword']);
12
-    Route::post('users/toggle-activity', [MinistryController::class, 'toggleActivity']);
13
-    Route::delete('/', [MinistryController::class, 'deleteProfile']);
6
+Route::name('ministry.')->prefix('ministry/')->group(function() {
7
+    Route::get('users', [ MinistryController::class, 'users' ]);
8
+    Route::put('social-link', [ MinistryController::class, 'saveSocialLink' ]);
9
+    Route::post('profile', [ MinistryController::class, 'updateProfile' ]);
10
+    Route::post('photo', [ MinistryController::class, 'updatePhoto' ]);
11
+    Route::post('password', [ MinistryController::class, 'updatePassword' ]);
12
+    Route::post('users/toggle-activity', [ MinistryController::class, 'toggleActivity' ]);
13
+    Route::delete('/', [ MinistryController::class, 'deleteProfile' ]);
14 14
 });
Please login to merge, or discard this patch.
src/Helpers/ImageHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
             return static::getDefaultImage();
25 25
         }
26 26
 
27
-        return (object) [
28
-            '_50' => $server.'/storage/'.$folder.'/50-50/'.$imageName,
29
-            '_100' => $server.'/storage/'.$folder.'/100-100/'.$imageName,
30
-            'original' => $server.'/storage/'.$folder.'/original/'.$imageName,
27
+        return (object)[
28
+            '_50' => $server . '/storage/' . $folder . '/50-50/' . $imageName,
29
+            '_100' => $server . '/storage/' . $folder . '/100-100/' . $imageName,
30
+            'original' => $server . '/storage/' . $folder . '/original/' . $imageName,
31 31
         ];
32 32
     }
33 33
 
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
             $protocol = 'https://';
45 45
         }
46 46
 
47
-        return (object) [
48
-            '_50' => $protocol.$_SERVER['HTTP_HOST'].'/images/logo-50.png',
49
-            '_100' => $protocol.$_SERVER['HTTP_HOST'].'/images/logo-100.png',
50
-            'original' => $protocol.$_SERVER['HTTP_HOST'].'/images/logo-original.png',
47
+        return (object)[
48
+            '_50' => $protocol . $_SERVER[ 'HTTP_HOST' ] . '/images/logo-50.png',
49
+            '_100' => $protocol . $_SERVER[ 'HTTP_HOST' ] . '/images/logo-100.png',
50
+            'original' => $protocol . $_SERVER[ 'HTTP_HOST' ] . '/images/logo-original.png',
51 51
         ];
52 52
     }
53 53
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public static function getImage(string $folder, ?Image $image, ?string $server = null)
63 63
     {
64
-        if (! $server) {
64
+        if (!$server) {
65 65
             $server = config('faithgen-sdk.ministries-server');
66 66
         }
67 67
 
Please login to merge, or discard this patch.
src/Observers/Ministry/ActivationObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,6 +9,6 @@
 block discarded – undo
9 9
 {
10 10
     public function creating(Activation $activation)
11 11
     {
12
-        $activation->code = (string) Str::uuid();
12
+        $activation->code = (string)Str::uuid();
13 13
     }
14 14
 }
Please login to merge, or discard this patch.
src/Observers/MinistryObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public function creating(Ministry $ministry)
16 16
     {
17 17
         $ministry->password = Hash::make(request()->password);
18
-        $ministry->id = (string) Str::uuid();
18
+        $ministry->id = (string)Str::uuid();
19 19
     }
20 20
 
21 21
     /**
Please login to merge, or discard this patch.
src/Observers/UserObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function creating(User $user)
24 24
     {
25
-        $user->id = (string) Str::uuid();
25
+        $user->id = (string)Str::uuid();
26 26
         $user->password = Hash::make(env('DEFAULT_PASSWORD', 'secret'));
27 27
     }
28 28
 
Please login to merge, or discard this patch.
src/Http/Controllers/UsersController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $ministryUser = auth()->user()
66 66
             ->ministryUsers()
67
-            ->whereHas('user', fn ($user) => $user->where($request->validated()))
67
+            ->whereHas('user', fn($user) => $user->where($request->validated()))
68 68
             ->first();
69 69
 
70 70
         if ($ministryUser) {
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
             'processing_image' => $request->has('image'),
90 90
         ];
91 91
 
92
-        if (! $request->has('image')) {
92
+        if (!$request->has('image')) {
93 93
             return $this->successResponse($messagePrefix, $data);
94 94
         } else {
95
-            return $this->successResponse($messagePrefix.' We are uploading your picture now', $data);
95
+            return $this->successResponse($messagePrefix . ' We are uploading your picture now', $data);
96 96
         }
97 97
     }
98 98
 
Please login to merge, or discard this patch.
src/Http/Controllers/CommentController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function presenceRegister(PresenceRegistryRequest $request)
18 18
     {
19
-        if (! config('faithgen-sdk.source')) {
19
+        if (!config('faithgen-sdk.source')) {
20 20
             event(new UserPresent(auth('web')->user(), $request->validated()));
21 21
         }
22 22
     }
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function showTyping(PresenceRegistryRequest $request)
30 30
     {
31
-        if (! config('faithgen-sdk.source')) {
31
+        if (!config('faithgen-sdk.source')) {
32 32
             event(new TypingRegistered(auth('web')->user(), $request->validated()));
33 33
         }
34 34
     }
Please login to merge, or discard this patch.
src/Http/Requests/SendRevealRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     {
27 27
         return [
28 28
             'review' => 'required|string',
29
-            'type' => 'required|in:'.implode(',', Helper::$reviewTypes),
29
+            'type' => 'required|in:' . implode(',', Helper::$reviewTypes),
30 30
         ];
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Http/Requests/Ministry/UpdateProfileRequest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             'email' => 'required|email',
30 30
             'phone' => 'required', //todo write a regex to serve,
31 31
             'links' => 'array',
32
-            'color' => 'required|'.Helper::$hexColorRegex,
32
+            'color' => 'required|' . Helper::$hexColorRegex,
33 33
             'location' => 'array',
34 34
             'links.*' => 'url',
35 35
             'statement' => 'array',
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
             'phones' => 'array',
39 39
             'emails.*' => 'email',
40 40
             'services' => 'array',
41
-            'services.*.day' => 'required|in:'.implode(',', Helper::$weekDays),
42
-            'services.*.start' => ['required', 'date_format:H:i', 'regex:/^((([01]?[0-9]|2[0-3]):[0-5][0-9])?)$/'],
43
-            'services.*.finish' => ['required', 'date_format:H:i', 'regex:/^((([01]?[0-9]|2[0-3]):[0-5][0-9])?)$/'],
41
+            'services.*.day' => 'required|in:' . implode(',', Helper::$weekDays),
42
+            'services.*.start' => [ 'required', 'date_format:H:i', 'regex:/^((([01]?[0-9]|2[0-3]):[0-5][0-9])?)$/' ],
43
+            'services.*.finish' => [ 'required', 'date_format:H:i', 'regex:/^((([01]?[0-9]|2[0-3]):[0-5][0-9])?)$/' ],
44 44
             'services.*.alias' => 'nullable',
45 45
         ];
46 46
     }
Please login to merge, or discard this patch.