@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function boot() |
| 16 | 16 | { |
| 17 | - Broadcast::routes(['middleware' => ['auth:api']]); |
|
| 17 | + Broadcast::routes([ 'middleware' => [ 'auth:api' ] ]); |
|
| 18 | 18 | |
| 19 | 19 | require base_path('routes/channels.php'); |
| 20 | 20 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | protected function configurePermissions() |
| 39 | 39 | { |
| 40 | - Jetstream::defaultApiTokenPermissions(['read']); |
|
| 40 | + Jetstream::defaultApiTokenPermissions([ 'read' ]); |
|
| 41 | 41 | |
| 42 | 42 | Jetstream::permissions([ |
| 43 | 43 | 'create', |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | $this->hideSensitiveRequestDetails(); |
| 22 | 22 | |
| 23 | - Telescope::filter(function (IncomingEntry $entry) { |
|
| 23 | + Telescope::filter(function(IncomingEntry $entry) { |
|
| 24 | 24 | if ($this->app->environment('local')) { |
| 25 | 25 | return true; |
| 26 | 26 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | return; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - Telescope::hideRequestParameters(['_token']); |
|
| 47 | + Telescope::hideRequestParameters([ '_token' ]); |
|
| 48 | 48 | |
| 49 | 49 | Telescope::hideRequestHeaders([ |
| 50 | 50 | 'cookie', |
@@ -62,10 +62,10 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | protected function gate() |
| 64 | 64 | { |
| 65 | - Gate::define('viewTelescope', function ($user) { |
|
| 65 | + Gate::define('viewTelescope', function($user) { |
|
| 66 | 66 | $mails = explode(',', config('telescope.mail_addresses')); |
| 67 | 67 | |
| 68 | - return in_array($user->email, $mails ?? []); |
|
| 68 | + return in_array($user->email, $mails ?? [ ]); |
|
| 69 | 69 | }); |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | protected function passwordRules() |
| 15 | 15 | { |
| 16 | - return ['required', 'string', new Password, 'confirmed']; |
|
| 16 | + return [ 'required', 'string', new Password, 'confirmed' ]; |
|
| 17 | 17 | } |
| 18 | 18 | } |
@@ -20,16 +20,16 @@ |
||
| 20 | 20 | public function update($user, array $input) |
| 21 | 21 | { |
| 22 | 22 | Validator::make($input, [ |
| 23 | - 'current_password' => ['required', 'string'], |
|
| 23 | + 'current_password' => [ 'required', 'string' ], |
|
| 24 | 24 | 'password' => $this->passwordRules(), |
| 25 | - ])->after(function ($validator) use ($user, $input) { |
|
| 26 | - if (! Hash::check($input['current_password'], $user->password)) { |
|
| 25 | + ])->after(function($validator) use ($user, $input) { |
|
| 26 | + if (!Hash::check($input[ 'current_password' ], $user->password)) { |
|
| 27 | 27 | $validator->errors()->add('current_password', __('The provided password does not match your current password.')); |
| 28 | 28 | } |
| 29 | 29 | })->validateWithBag('updatePassword'); |
| 30 | 30 | |
| 31 | 31 | $user->forceFill([ |
| 32 | - 'password' => Hash::make($input['password']), |
|
| 32 | + 'password' => Hash::make($input[ 'password' ]), |
|
| 33 | 33 | ])->save(); |
| 34 | 34 | } |
| 35 | 35 | } |
@@ -20,15 +20,15 @@ |
||
| 20 | 20 | public function create(array $input) |
| 21 | 21 | { |
| 22 | 22 | Validator::make($input, [ |
| 23 | - 'name' => ['required', 'string', 'max:255'], |
|
| 24 | - 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
|
| 23 | + 'name' => [ 'required', 'string', 'max:255' ], |
|
| 24 | + 'email' => [ 'required', 'string', 'email', 'max:255', 'unique:users' ], |
|
| 25 | 25 | 'password' => $this->passwordRules(), |
| 26 | 26 | ])->validate(); |
| 27 | 27 | |
| 28 | 28 | return User::create([ |
| 29 | - 'name' => $input['name'], |
|
| 30 | - 'email' => $input['email'], |
|
| 31 | - 'password' => Hash::make($input['password']), |
|
| 29 | + 'name' => $input[ 'name' ], |
|
| 30 | + 'email' => $input[ 'email' ], |
|
| 31 | + 'password' => Hash::make($input[ 'password' ]), |
|
| 32 | 32 | ]); |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -19,22 +19,22 @@ discard block |
||
| 19 | 19 | public function update($user, array $input) |
| 20 | 20 | { |
| 21 | 21 | Validator::make($input, [ |
| 22 | - 'name' => ['required', 'string', 'max:255'], |
|
| 23 | - 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)], |
|
| 24 | - 'photo' => ['nullable', 'image', 'max:1024'], |
|
| 22 | + 'name' => [ 'required', 'string', 'max:255' ], |
|
| 23 | + 'email' => [ 'required', 'email', 'max:255', Rule::unique('users')->ignore($user->id) ], |
|
| 24 | + 'photo' => [ 'nullable', 'image', 'max:1024' ], |
|
| 25 | 25 | ])->validateWithBag('updateProfileInformation'); |
| 26 | 26 | |
| 27 | - if (isset($input['photo'])) { |
|
| 28 | - $user->updateProfilePhoto($input['photo']); |
|
| 27 | + if (isset($input[ 'photo' ])) { |
|
| 28 | + $user->updateProfilePhoto($input[ 'photo' ]); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - if ($input['email'] !== $user->email && |
|
| 31 | + if ($input[ 'email' ] !== $user->email && |
|
| 32 | 32 | $user instanceof MustVerifyEmail) { |
| 33 | 33 | $this->updateVerifiedUser($user, $input); |
| 34 | 34 | } else { |
| 35 | 35 | $user->forceFill([ |
| 36 | - 'name' => $input['name'], |
|
| 37 | - 'email' => $input['email'], |
|
| 36 | + 'name' => $input[ 'name' ], |
|
| 37 | + 'email' => $input[ 'email' ], |
|
| 38 | 38 | ])->save(); |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | protected function updateVerifiedUser($user, array $input) |
| 50 | 50 | { |
| 51 | 51 | $user->forceFill([ |
| 52 | - 'name' => $input['name'], |
|
| 53 | - 'email' => $input['email'], |
|
| 52 | + 'name' => $input[ 'name' ], |
|
| 53 | + 'email' => $input[ 'email' ], |
|
| 54 | 54 | 'email_verified_at' => null, |
| 55 | 55 | ])->save(); |
| 56 | 56 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | ])->validate(); |
| 25 | 25 | |
| 26 | 26 | $user->forceFill([ |
| 27 | - 'password' => Hash::make($input['password']), |
|
| 27 | + 'password' => Hash::make($input[ 'password' ]), |
|
| 28 | 28 | ])->save(); |
| 29 | 29 | } |
| 30 | 30 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | * @param array $recipients |
| 55 | 55 | * @return Thread |
| 56 | 56 | */ |
| 57 | - public function newThread(string $subject, User $user, array $content, array $recipients = []): Thread; |
|
| 57 | + public function newThread(string $subject, User $user, array $content, array $recipients = [ ]): Thread; |
|
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * New message. |