Passed
Push — master ( 0fe0e0...2b8d14 )
by Innocent
03:27
created
src/Http/Controllers/MinistryController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function getSocialLink(GetRequest $request)
57 57
     {
58 58
         return response()->json([
59
-            'link' => auth()->user()->profile[$request->platform],
59
+            'link' => auth()->user()->profile[ $request->platform ],
60 60
         ]);
61 61
     }
62 62
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function saveSocialLink(UpdateRequest $request)
70 70
     {
71 71
         $profile = auth()->user()->profile;
72
-        $profile[$request->platform] = $request->link;
72
+        $profile[ $request->platform ] = $request->link;
73 73
         try {
74 74
             $profile->save();
75 75
 
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
             $this->deleteFiles(auth()->user());
112 112
         }
113 113
 
114
-        $fileName = str_shuffle(auth()->user()->id.time().time()).'.png';
115
-        $ogSave = storage_path('app/public/profile/original/').$fileName;
114
+        $fileName = str_shuffle(auth()->user()->id . time() . time()) . '.png';
115
+        $ogSave = storage_path('app/public/profile/original/') . $fileName;
116 116
         $imageManager->make($request->image)->save($ogSave);
117
-        $image = auth()->user()->image()->updateOrCreate([], [
117
+        $image = auth()->user()->image()->updateOrCreate([ ], [
118 118
             'name' => $fileName,
119 119
         ]);
120 120
 
@@ -179,25 +179,25 @@  discard block
 block discarded – undo
179 179
      */
180 180
     public function updateProfile(UpdateProfileRequest $request)
181 181
     {
182
-        $ministryParams = $request->only(['name', 'email', 'phone']);
182
+        $ministryParams = $request->only([ 'name', 'email', 'phone' ]);
183 183
 
184 184
         auth()->user()->update($ministryParams);
185 185
 
186
-        $links = ['website', 'facebook', 'youtube', 'twitter', 'instagram'];
187
-        $statements = ['vision', 'mission', 'about_us'];
186
+        $links = [ 'website', 'facebook', 'youtube', 'twitter', 'instagram' ];
187
+        $statements = [ 'vision', 'mission', 'about_us' ];
188 188
 
189
-        $params = ['color' => $request->color];
189
+        $params = [ 'color' => $request->color ];
190 190
 
191
-        $params = array_merge($params, array_filter($request->links, fn ($link) => in_array($link, $links), ARRAY_FILTER_USE_KEY));
191
+        $params = array_merge($params, array_filter($request->links, fn($link) => in_array($link, $links), ARRAY_FILTER_USE_KEY));
192 192
 
193
-        $params = array_merge($params, array_filter($request->statement, fn ($link) => in_array($link, $statements), ARRAY_FILTER_USE_KEY));
193
+        $params = array_merge($params, array_filter($request->statement, fn($link) => in_array($link, $statements), ARRAY_FILTER_USE_KEY));
194 194
 
195
-        $params = array_merge($params, ['emails' => $request->emails]);
195
+        $params = array_merge($params, [ 'emails' => $request->emails ]);
196 196
 
197
-        $params = array_merge($params, ['phones' => $request->phones]);
197
+        $params = array_merge($params, [ 'phones' => $request->phones ]);
198 198
 
199 199
         if ($request->has('location')) {
200
-            $params = array_merge($params, ['location' => $request->location]);
200
+            $params = array_merge($params, [ 'location' => $request->location ]);
201 201
         }
202 202
 
203 203
         $this->saveServices($request, auth()->user());
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
                 ->whereIn('id', $ministry->services()->pluck('id')->toArray())
219 219
                 ->delete();
220 220
 
221
-            $services = array_map(function ($service) {
221
+            $services = array_map(function($service) {
222 222
                 return array_merge($service, [
223
-                    'id' => str_shuffle((string) Str::uuid()),
223
+                    'id' => str_shuffle((string)Str::uuid()),
224 224
                     'ministry_id' => auth()->user()->id,
225 225
                     'created_at' => now(),
226 226
                     'updated_at' => now(),
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      */
239 239
     public function getLinks($links)
240 240
     {
241
-        $_links = ['website', 'facebook', 'youtube', 'twitter', 'instagram'];
241
+        $_links = [ 'website', 'facebook', 'youtube', 'twitter', 'instagram' ];
242 242
 
243 243
         return array_key_exists($links, $_links);
244 244
     }
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
             ->ministryUsers()
266 266
             ->latest()
267 267
             //->with(['user.image'])
268
-            ->where(fn ($ministryUser) => $ministryUser->whereHas('user', fn ($user) => $user->search(['name', 'email'], $request->filter_text)))
268
+            ->where(fn($ministryUser) => $ministryUser->whereHas('user', fn($user) => $user->search([ 'name', 'email' ], $request->filter_text)))
269 269
             ->paginate(Helper::getLimit($request));
270 270
 
271 271
         //return $ministryUsers;
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.
src/Mixins/DatabaseBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function search()
15 15
     {
16
-        return function ($attributes, ?string $filter_text) {
16
+        return function($attributes, ?string $filter_text) {
17 17
             if ($filter_text) {
18
-                $filter_text = '%'.$filter_text.'%';
18
+                $filter_text = '%' . $filter_text . '%';
19 19
             }
20 20
 
21 21
             if (is_string($attributes)) {
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
 
28 28
                 $attribute = $attributes->first();
29 29
 
30
-                $remainderKeys = $attributes->filter(fn ($field) => $field !== $attribute)->toArray();
30
+                $remainderKeys = $attributes->filter(fn($field) => $field !== $attribute)->toArray();
31 31
 
32 32
                 $query = $this->where($attribute, 'LIKE', $filter_text);
33 33
 
34 34
                 if (count($remainderKeys)) {
35 35
                     foreach ($remainderKeys as $key) {
36
-                        if (! Str::of($key)->contains('.')) {
36
+                        if (!Str::of($key)->contains('.')) {
37 37
                             $query->orWhere($key, 'LIKE', $filter_text);
38 38
                         } else {
39
-                            [$relationship, $column] = explode('.', $key);
39
+                            [ $relationship, $column ] = explode('.', $key);
40 40
 
41 41
                             // $eloquentBuilder->orWhereHas($relationship, fn($model) => $model->where($column, 'LIKE', $filter_text));
42 42
                         }
Please login to merge, or discard this patch.
src/Notifications/Ministry/ForgotPassword.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function via($notifiable)
36 36
     {
37
-        return ['mail'];
37
+        return [ 'mail' ];
38 38
     }
39 39
 
40 40
     /**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function toMail($notifiable)
47 47
     {
48 48
         return (new MailMessage)
49
-            ->greeting('Hello '.$this->ministry->name)
49
+            ->greeting('Hello ' . $this->ministry->name)
50 50
             ->line('You have requested for a password change, Please click the link below to update it!')
51 51
             ->action('Reset Password', url('/'))
52 52
             ->from('[email protected]', 'Faith Gen')
Please login to merge, or discard this patch.
src/Notifications/Ministry/AccountCreated.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function via($notifiable)
37 37
     {
38
-        return ['mail'];
38
+        return [ 'mail' ];
39 39
     }
40 40
 
41 41
     /**
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function toMail($notifiable)
48 48
     {
49
-        $url = url('/auth/activate/'.$this->ministry->id.'/'.$this->ministry->activation->code);
49
+        $url = url('/auth/activate/' . $this->ministry->id . '/' . $this->ministry->activation->code);
50 50
 
51 51
         return (new MailMessage)
52
-            ->greeting('Hello '.$this->ministry->name)
52
+            ->greeting('Hello ' . $this->ministry->name)
53 53
             ->subject('FaithGen account created!')
54 54
             ->from('[email protected]', 'Faith Gen')
55 55
             ->line('We have received your account registration request, please just activate your account to get started with us')
Please login to merge, or discard this patch.
src/Notifications/Ministry/AccountActivated.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function via($notifiable)
37 37
     {
38
-        return ['mail'];
38
+        return [ 'mail' ];
39 39
     }
40 40
 
41 41
     /**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function toMail($notifiable)
48 48
     {
49 49
         return (new MailMessage)
50
-            ->greeting('Hello '.$this->ministry->name)
50
+            ->greeting('Hello ' . $this->ministry->name)
51 51
             ->subject('Account activated')
52 52
             ->line('Your FaithGen account has been activated.')
53 53
             ->line('Please feel free to use our platform and always contact support if you miss something.')
Please login to merge, or discard this patch.
src/FaithGenSDKServiceProvider.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -23,30 +23,30 @@  discard block
 block discarded – undo
23 23
         $this->registerUserAuthRoutes();
24 24
 
25 25
         if ($this->app->runningInConsole()) {
26
-            $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
26
+            $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
27 27
 
28 28
             $this->publishes([
29
-                __DIR__.'/../config/faithgen-sdk.php' => config_path('faithgen-sdk.php'),
29
+                __DIR__ . '/../config/faithgen-sdk.php' => config_path('faithgen-sdk.php'),
30 30
             ], 'faithgen-sdk-config');
31 31
 
32
-            $this->setUpSourceFiles(function () {
32
+            $this->setUpSourceFiles(function() {
33 33
                 $this->publishes([
34
-                    __DIR__.'/../database/migrations/' => database_path('migrations'),
34
+                    __DIR__ . '/../database/migrations/' => database_path('migrations'),
35 35
                 ], 'faithgen-sdk-migrations');
36 36
 
37 37
                 $this->publishes([
38
-                    __DIR__.'/../storage/profile/' => storage_path('app/public/profile'),
38
+                    __DIR__ . '/../storage/profile/' => storage_path('app/public/profile'),
39 39
                 ], 'faithgen-sdk-storage');
40 40
             });
41 41
 
42
-            if (! config('faithgen-sdk.source')) {
42
+            if (!config('faithgen-sdk.source')) {
43 43
                 $this->publishes([
44
-                    __DIR__.'/../storage/users/' => storage_path('app/public/users'),
44
+                    __DIR__ . '/../storage/users/' => storage_path('app/public/users'),
45 45
                 ], 'faithgen-sdk-storage');
46 46
             }
47 47
 
48 48
             $this->publishes([
49
-                __DIR__.'/../storage/logo/' => public_path('images'),
49
+                __DIR__ . '/../storage/logo/' => public_path('images'),
50 50
             ], 'faithgen-logo');
51 51
         }
52 52
 
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
 
71 71
     private function registerApiRoutes()
72 72
     {
73
-        Route::group($this->apiRouteConfiguration(), function () {
74
-            $this->loadRoutesFrom(__DIR__.'/../routes/api.php');
73
+        Route::group($this->apiRouteConfiguration(), function() {
74
+            $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');
75 75
         });
76 76
     }
77 77
 
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
     private function registerParentRoutes()
92 92
     {
93 93
         if (config('faithgen-sdk.source')) {
94
-            Route::group($this->parentRouteConfiguration(), function () {
95
-                $this->loadRoutesFrom(__DIR__.'/../routes/source.php');
94
+            Route::group($this->parentRouteConfiguration(), function() {
95
+                $this->loadRoutesFrom(__DIR__ . '/../routes/source.php');
96 96
             });
97 97
 
98 98
             $this->registerAuthRoutes();
99 99
 
100
-            $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
100
+            $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');
101 101
         }
102 102
     }
103 103
 
@@ -105,21 +105,21 @@  discard block
 block discarded – undo
105 105
     {
106 106
         return [
107 107
             'prefix' => config('faithgen-sdk.prefix'),
108
-            'middleware' => ['bindings'],
108
+            'middleware' => [ 'bindings' ],
109 109
         ];
110 110
     }
111 111
 
112 112
     private function registerAuthRoutes()
113 113
     {
114
-        Route::group($this->authRouteConfiguration(), function () {
115
-            $this->loadRoutesFrom(__DIR__.'/../routes/auth.php');
114
+        Route::group($this->authRouteConfiguration(), function() {
115
+            $this->loadRoutesFrom(__DIR__ . '/../routes/auth.php');
116 116
         });
117 117
     }
118 118
 
119 119
     private function registerUserAuthRoutes()
120 120
     {
121
-        Route::group($this->authRouteConfiguration(), function () {
122
-            $this->loadRoutesFrom(__DIR__.'/../routes/users-auth.php');
121
+        Route::group($this->authRouteConfiguration(), function() {
122
+            $this->loadRoutesFrom(__DIR__ . '/../routes/users-auth.php');
123 123
         });
124 124
     }
125 125
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public function register()
132 132
     {
133
-        $this->mergeConfigFrom(__DIR__.'/../config/faithgen-sdk.php', 'faithgen-sdk');
133
+        $this->mergeConfigFrom(__DIR__ . '/../config/faithgen-sdk.php', 'faithgen-sdk');
134 134
 
135 135
         $this->app->singleton(ProfileService::class);
136 136
         $this->app->singleton(ImageService::class);
Please login to merge, or discard this patch.