@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * For the full copyright and license information, please view the LICENSE |
| 5 | 5 | * file that was distributed with this source code. |
| 6 | 6 | */ |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace App\GraphQL\Kernel; |
| 10 | 10 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * @param array $args |
| 59 | 59 | * @return \Generator|null |
| 60 | 60 | */ |
| 61 | - public function validate(Validator $validator, array $args = []): ?\Generator |
|
| 61 | + public function validate(Validator $validator, array $args = []): ? \Generator |
|
| 62 | 62 | { |
| 63 | 63 | return null; |
| 64 | 64 | } |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * For the full copyright and license information, please view the LICENSE |
| 7 | 7 | * file that was distributed with this source code. |
| 8 | 8 | */ |
| 9 | -declare(strict_types=1); |
|
| 9 | +declare(strict_types = 1); |
|
| 10 | 10 | |
| 11 | 11 | namespace App\GraphQL\Serializers; |
| 12 | 12 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | public function toArray($user): array |
| 26 | 26 | { |
| 27 | 27 | return [ |
| 28 | - 'id' => (int)$user->id, |
|
| 28 | + 'id' => (int) $user->id, |
|
| 29 | 29 | 'name' => $user->name, |
| 30 | 30 | 'email' => $user->email, |
| 31 | 31 | 'avatar' => $user->avatar, |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | * For the full copyright and license information, please view the LICENSE |
| 5 | 5 | * file that was distributed with this source code. |
| 6 | 6 | */ |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace App\GraphQL\Mutations; |
| 10 | 10 | |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * For the full copyright and license information, please view the LICENSE |
| 7 | 7 | * file that was distributed with this source code. |
| 8 | 8 | */ |
| 9 | -declare(strict_types=1); |
|
| 9 | +declare(strict_types = 1); |
|
| 10 | 10 | |
| 11 | 11 | namespace App\GraphQL\Types; |
| 12 | 12 | |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * For the full copyright and license information, please view the LICENSE |
| 7 | 7 | * file that was distributed with this source code. |
| 8 | 8 | */ |
| 9 | -declare(strict_types=1); |
|
| 9 | +declare(strict_types = 1); |
|
| 10 | 10 | |
| 11 | 11 | namespace App\GraphQL\Serializers; |
| 12 | 12 | |
@@ -10,13 +10,11 @@ |
||
| 10 | 10 | |
| 11 | 11 | use App\GraphQL\Serializers\AuthUserSerializer; |
| 12 | 12 | use App\Services\TokenAuth; |
| 13 | -use Illuminate\Contracts\Auth\Guard; |
|
| 14 | 13 | use Illuminate\Contracts\Auth\StatefulGuard; |
| 15 | 14 | use Illuminate\Support\Arr; |
| 16 | 15 | use GraphQL\Type\Definition\Type; |
| 17 | 16 | use App\GraphQL\Types\AuthUserType; |
| 18 | 17 | use GraphQL\Type\Definition\ObjectType; |
| 19 | -use App\GraphQL\Serializers\UserSerializer; |
|
| 20 | 18 | use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; |
| 21 | 19 | |
| 22 | 20 | /** |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * For the full copyright and license information, please view the LICENSE |
| 5 | 5 | * file that was distributed with this source code. |
| 6 | 6 | */ |
| 7 | -declare(strict_types=1); |
|
| 7 | +declare(strict_types = 1); |
|
| 8 | 8 | |
| 9 | 9 | namespace App\GraphQL\Mutations; |
| 10 | 10 | |
@@ -110,12 +110,12 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | $user = $this->tokenAuth->attemptFromEmailAndPassword($email, $password); |
| 112 | 112 | |
| 113 | - if (! $user) { |
|
| 113 | + if (!$user) { |
|
| 114 | 114 | throw new AccessDeniedHttpException('User password are not correct'); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | if (isset($args['remember'])) { |
| 118 | - $this->guard->login($user, (bool)$args['remember']); |
|
| 118 | + $this->guard->login($user, (bool) $args['remember']); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | return AuthUserSerializer::serialize($user); |