Skip to content

Commit 4e559d5

Browse files
authored
Merge pull request #182 from joselfonseca/analysis-N43lBp
Apply fixes from StyleCI
2 parents db59781 + 543f82b commit 4e559d5

22 files changed

+54
-54
lines changed

src/Events/PasswordUpdated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PasswordUpdated
2121
/**
2222
* PasswordUpdated constructor.
2323
*
24-
* @param $user
24+
* @param $user
2525
*/
2626
public function __construct($user)
2727
{

src/Exceptions/AuthenticationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function isClientSafe(): bool
4141
public function getExtensions(): array
4242
{
4343
return [
44-
'reason' => $this->reason,
44+
'reason' => $this->reason,
4545
];
4646
}
4747
}

src/Exceptions/ValidationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ValidationException extends Exception implements ClientAware, ProvidesExte
1919
/**
2020
* ValidationException constructor.
2121
*
22-
* @param $validator
22+
* @param $validator
2323
* @param string $message
2424
*/
2525
public function __construct($errors, string $message = '')

src/GraphQL/Mutations/ForgotPassword.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@
1111
class ForgotPassword
1212
{
1313
/**
14-
* @param $rootValue
14+
* @param $rootValue
1515
* @param array $args
1616
* @param \Nuwave\Lighthouse\Support\Contracts\GraphQLContext|null $context
1717
* @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo
1818
* @return array
1919
*
2020
* @throws \Exception
2121
*/
22-
public function resolve($rootValue, array $args, GraphQLContext $context = null, ResolveInfo $resolveInfo)
22+
public function resolve($rootValue, array $args, ?GraphQLContext $context = null, ResolveInfo $resolveInfo)
2323
{
2424
$response = $this->broker()->sendResetLink(['email' => $args['email']]);
2525

2626
if ($response == Password::RESET_LINK_SENT) {
2727
event(new ForgotPasswordRequested($args['email']));
2828

2929
return [
30-
'status' => 'EMAIL_SENT',
30+
'status' => 'EMAIL_SENT',
3131
'message' => __($response),
3232
];
3333
}

src/GraphQL/Mutations/Login.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
class Login extends BaseAuthResolver
1111
{
1212
/**
13-
* @param $rootValue
13+
* @param $rootValue
1414
* @param array $args
1515
* @param \Nuwave\Lighthouse\Support\Contracts\GraphQLContext|null $context
1616
* @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo
1717
* @return array
1818
*
1919
* @throws \Exception
2020
*/
21-
public function resolve($rootValue, array $args, GraphQLContext $context = null, ResolveInfo $resolveInfo)
21+
public function resolve($rootValue, array $args, ?GraphQLContext $context = null, ResolveInfo $resolveInfo)
2222
{
2323
$credentials = $this->buildCredentials($args);
2424
$response = $this->makeRequest($credentials);

src/GraphQL/Mutations/Logout.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
class Logout extends BaseAuthResolver
1212
{
1313
/**
14-
* @param $rootValue
14+
* @param $rootValue
1515
* @param array $args
1616
* @param \Nuwave\Lighthouse\Support\Contracts\GraphQLContext|null $context
1717
* @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo
1818
* @return array
1919
*
2020
* @throws \Exception
2121
*/
22-
public function resolve($rootValue, array $args, GraphQLContext $context = null, ResolveInfo $resolveInfo)
22+
public function resolve($rootValue, array $args, ?GraphQLContext $context = null, ResolveInfo $resolveInfo)
2323
{
2424
if (! Auth::guard('api')->check()) {
2525
throw new AuthenticationException('Not Authenticated', 'Not Authenticated');
@@ -31,7 +31,7 @@ public function resolve($rootValue, array $args, GraphQLContext $context = null,
3131
event(new UserLoggedOut($user));
3232

3333
return [
34-
'status' => 'TOKEN_REVOKED',
34+
'status' => 'TOKEN_REVOKED',
3535
'message' => __('Your session has been terminated'),
3636
];
3737
}

src/GraphQL/Mutations/RefreshToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class RefreshToken extends BaseAuthResolver
2323
*
2424
* @throws \Exception
2525
*/
26-
public function resolve($rootValue, array $args, GraphQLContext $context = null, ResolveInfo $resolveInfo)
26+
public function resolve($rootValue, array $args, ?GraphQLContext $context = null, ResolveInfo $resolveInfo)
2727
{
2828
$credentials = $this->buildCredentials($args, 'refresh_token');
2929

src/GraphQL/Mutations/Register.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
class Register extends BaseAuthResolver
1313
{
1414
/**
15-
* @param $rootValue
15+
* @param $rootValue
1616
* @param array $args
1717
* @param \Nuwave\Lighthouse\Support\Contracts\GraphQLContext|null $context
1818
* @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo
1919
* @return array
2020
*
2121
* @throws \Exception
2222
*/
23-
public function resolve($rootValue, array $args, GraphQLContext $context = null, ResolveInfo $resolveInfo)
23+
public function resolve($rootValue, array $args, ?GraphQLContext $context = null, ResolveInfo $resolveInfo)
2424
{
2525
$model = $this->createAuthModel($args);
2626

src/GraphQL/Mutations/ResetPassword.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
class ResetPassword
1616
{
1717
/**
18-
* @param $rootValue
18+
* @param $rootValue
1919
* @param array $args
2020
* @param GraphQLContext|null $context
2121
* @param ResolveInfo $resolveInfo
2222
* @return array
2323
*/
24-
public function resolve($rootValue, array $args, GraphQLContext $context = null, ResolveInfo $resolveInfo)
24+
public function resolve($rootValue, array $args, ?GraphQLContext $context = null, ResolveInfo $resolveInfo)
2525
{
2626
$args = collect($args)->except('directive')->toArray();
2727
$response = $this->broker()->reset($args, function ($user, $password) {
@@ -30,7 +30,7 @@ public function resolve($rootValue, array $args, GraphQLContext $context = null,
3030

3131
if ($response === Password::PASSWORD_RESET) {
3232
return [
33-
'status' => 'PASSWORD_UPDATED',
33+
'status' => 'PASSWORD_UPDATED',
3434
'message' => __($response),
3535
];
3636
}

src/GraphQL/Mutations/SocialLogin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
class SocialLogin extends BaseAuthResolver
1313
{
1414
/**
15-
* @param $rootValue
15+
* @param $rootValue
1616
* @param array $args
1717
* @param \Nuwave\Lighthouse\Support\Contracts\GraphQLContext|null $context
1818
* @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo
1919
* @return array
2020
*
2121
* @throws \Exception
2222
*/
23-
public function resolve($rootValue, array $args, GraphQLContext $context = null, ResolveInfo $resolveInfo)
23+
public function resolve($rootValue, array $args, ?GraphQLContext $context = null, ResolveInfo $resolveInfo)
2424
{
2525
$credentials = $this->buildCredentials($args, 'social_grant');
2626
$response = $this->makeRequest($credentials);

0 commit comments

Comments
 (0)