@@ -26,7 +26,7 @@ |
||
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 | } |
@@ -29,7 +29,7 @@ discard block |
||
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 |
||
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 | } |
@@ -13,9 +13,9 @@ discard block |
||
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 |
||
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 | } |
@@ -34,7 +34,7 @@ discard block |
||
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 |
||
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') |
@@ -35,7 +35,7 @@ discard block |
||
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 |
||
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') |
@@ -35,7 +35,7 @@ discard block |
||
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 |
||
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.') |
@@ -23,30 +23,30 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * |
13 | 13 | * @var array |
14 | 14 | */ |
15 | - protected $policies = []; |
|
15 | + protected $policies = [ ]; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Register services. |
@@ -36,12 +36,12 @@ discard block |
||
36 | 36 | Auth::guard('web')->loginUsingId($user_id); |
37 | 37 | } |
38 | 38 | |
39 | - if (! config('faithgen-sdk.source')) { |
|
40 | - Auth::viaRequest('api-key', function ($request) { |
|
39 | + if (!config('faithgen-sdk.source')) { |
|
40 | + Auth::viaRequest('api-key', function($request) { |
|
41 | 41 | $api_key = request()->headers->get('x-api-key'); |
42 | 42 | $class = config('auth.providers.ministries.model'); |
43 | 43 | |
44 | - return $class::whereHas('apiKey', function ($apiKey) use ($api_key) { |
|
44 | + return $class::whereHas('apiKey', function($apiKey) use ($api_key) { |
|
45 | 45 | return $apiKey->where('api_key', $api_key); |
46 | 46 | })->first(); |
47 | 47 | }); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | use ManyMinistryUsers; |
25 | 25 | use CreatableTrait; |
26 | 26 | |
27 | - protected $guarded = ['id']; |
|
27 | + protected $guarded = [ 'id' ]; |
|
28 | 28 | public $incrementing = false; |
29 | 29 | protected $hidden = [ |
30 | 30 | 'password', |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | public function getJWTCustomClaims() |
41 | 41 | { |
42 | - return []; |
|
42 | + return [ ]; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | return $phones; |
106 | 106 | } else { |
107 | - return [$this->phone]; |
|
107 | + return [ $this->phone ]; |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | return $emails; |
118 | 118 | } else { |
119 | - return [$this->email]; |
|
119 | + return [ $this->email ]; |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | public function getUsersAttribute() |
142 | 142 | { |
143 | 143 | return $this->ministryUsers() |
144 | - ->map(fn ($minUser) => $minUser->user) |
|
144 | + ->map(fn($minUser) => $minUser->user) |
|
145 | 145 | ->flatten(); |
146 | 146 | } |
147 | 147 | } |