@@ -14,5 +14,5 @@ |
||
| 14 | 14 | * |
| 15 | 15 | * @var array |
| 16 | 16 | */ |
| 17 | - protected $dates = ['last_read', 'created_at', 'updated_at', 'deleted_at']; |
|
| 17 | + protected $dates = [ 'last_read', 'created_at', 'updated_at', 'deleted_at' ]; |
|
| 18 | 18 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function via($notifiable) |
| 31 | 31 | { |
| 32 | - return ['mail']; |
|
| 32 | + return [ 'mail' ]; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if (!$request->expectsJson()) { |
|
| 18 | 18 | return route('login'); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | */ |
| 75 | 75 | public function callback(string $provider, Request $request) |
| 76 | 76 | { |
| 77 | - $client = $request->session()->get('client', []); |
|
| 77 | + $client = $request->session()->get('client', [ ]); |
|
| 78 | 78 | $user = $this->service->callback($provider, $client); |
| 79 | 79 | $URI = Arr::get($client, 'redirect_uri', false); |
| 80 | 80 | |
@@ -11,11 +11,11 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | protected static function bootHasUUID() |
| 13 | 13 | { |
| 14 | - static::creating(function ($model) { |
|
| 14 | + static::creating(function($model) { |
|
| 15 | 15 | /* |
| 16 | 16 | * @var \Illuminate\Database\Eloquent\Model |
| 17 | 17 | */ |
| 18 | - if (! $model->getKey()) { |
|
| 18 | + if (!$model->getKey()) { |
|
| 19 | 19 | $model->{$model->getKeyName()} = Str::uuid()->toString(); |
| 20 | 20 | } |
| 21 | 21 | }); |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | public function user(string $provider, UserContract $userContract): User |
| 83 | 83 | { |
| 84 | 84 | return User::updateOrCreate([ |
| 85 | - 'provider_name' => $provider, // GitHub, LinkedIn, Google, Apple |
|
| 86 | - 'provider_id' => $userContract->getId(), // unsignedBigInteger, uuid |
|
| 85 | + 'provider_name' => $provider, // GitHub, LinkedIn, Google, Apple |
|
| 86 | + 'provider_id' => $userContract->getId(), // unsignedBigInteger, uuid |
|
| 87 | 87 | ], [ |
| 88 | 88 | 'name' => $userContract->getName() ?? $userContract->getNickname(), |
| 89 | 89 | /** |
@@ -92,11 +92,11 @@ discard block |
||
| 92 | 92 | * Tokens for retrieve data from authorization |
| 93 | 93 | * server such as GitHub, Twitter or Google. |
| 94 | 94 | */ |
| 95 | - 'email' => $userContract->getEmail(), // OAuth provider e-mail address |
|
| 96 | - 'notify_via' => ['broadcast'], // Default notification preference |
|
| 97 | - 'access_token' => $userContract->token, // TOKEN |
|
| 98 | - 'refresh_token' => $userContract->refreshToken, // TOKEN - some providers have it |
|
| 99 | - 'profile' => $userContract->user, // JSON profile data |
|
| 95 | + 'email' => $userContract->getEmail(), // OAuth provider e-mail address |
|
| 96 | + 'notify_via' => [ 'broadcast' ], // Default notification preference |
|
| 97 | + 'access_token' => $userContract->token, // TOKEN |
|
| 98 | + 'refresh_token' => $userContract->refreshToken, // TOKEN - some providers have it |
|
| 99 | + 'profile' => $userContract->user, // JSON profile data |
|
| 100 | 100 | ]); |
| 101 | 101 | } |
| 102 | 102 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function register() |
| 17 | 17 | { |
| 18 | - $this->app->bind(UserServiceInterface::class, function ($app) { |
|
| 18 | + $this->app->bind(UserServiceInterface::class, function($app) { |
|
| 19 | 19 | return new UserService(); |
| 20 | 20 | }); |
| 21 | 21 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function register() |
| 17 | 17 | { |
| 18 | - $this->app->bind(ContactServiceInterface::class, function ($app) { |
|
| 18 | + $this->app->bind(ContactServiceInterface::class, function($app) { |
|
| 19 | 19 | return new ContactService(); |
| 20 | 20 | }); |
| 21 | 21 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function register() |
| 18 | 18 | { |
| 19 | - $this->app->bind(LoginServiceInterface::class, function ($app) { |
|
| 19 | + $this->app->bind(LoginServiceInterface::class, function($app) { |
|
| 20 | 20 | return new LoginService( |
| 21 | 21 | $app->make(ClientRepository::class) |
| 22 | 22 | ); |