Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): fix phpcs linter warning #461

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Controllers/CallbackControllerAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Throwable;

use function is_string;
use function sprintf;

/**
* @api
Expand Down Expand Up @@ -75,7 +76,7 @@

Events::framework(new Failed($guard::class, $guard->user(), $credentials));

session()->invalidate();

Check failure on line 79 in src/Controllers/CallbackControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2)

Dynamic call to static method Illuminate\Session\Store::invalidate().

Check failure on line 79 in src/Controllers/CallbackControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3)

Dynamic call to static method Illuminate\Session\Store::invalidate().

Events::dispatch($event = new AuthenticationFailed($throwable, true));

Expand All @@ -99,13 +100,13 @@
'error' => ['error' => $error, 'description' => $errorDescription],
]));

session()->invalidate();

Check failure on line 103 in src/Controllers/CallbackControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2)

Dynamic call to static method Illuminate\Session\Store::invalidate().

Check failure on line 103 in src/Controllers/CallbackControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3)

Dynamic call to static method Illuminate\Session\Store::invalidate().

// Create a dynamic exception to report the API error response
$exception = new CallbackControllerException(sprintf(CallbackControllerException::MSG_API_RESPONSE, $error, $errorDescription));

// Store the API exception in the session as a flash variable, in case the application wants to access it.
session()->flash('auth0.callback.error', sprintf(CallbackControllerException::MSG_API_RESPONSE, $error, $errorDescription));

Check failure on line 109 in src/Controllers/CallbackControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2)

Dynamic call to static method Illuminate\Session\Store::flash().

Check failure on line 109 in src/Controllers/CallbackControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3)

Dynamic call to static method Illuminate\Session\Store::flash().

Events::dispatch($event = new AuthenticationFailed($exception, true));

Expand All @@ -125,7 +126,7 @@
if ($credential instanceof CredentialEntityContract && $user instanceof Authenticatable) {
Events::framework(new Validated($guard::class, $user));

session()->regenerate(true);

Check failure on line 129 in src/Controllers/CallbackControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2)

Dynamic call to static method Illuminate\Session\Store::regenerate().

Check failure on line 129 in src/Controllers/CallbackControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3)

Dynamic call to static method Illuminate\Session\Store::regenerate().

/**
* @var Guard $guard
Expand Down
2 changes: 2 additions & 0 deletions src/Controllers/LoginControllerAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

use function sprintf;

/**
* Controller for handling a login request.
*
Expand Down Expand Up @@ -51,7 +53,7 @@
);
}

session()->regenerate(true);

Check failure on line 56 in src/Controllers/LoginControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2)

Dynamic call to static method Illuminate\Session\Store::regenerate().

Check failure on line 56 in src/Controllers/LoginControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3)

Dynamic call to static method Illuminate\Session\Store::regenerate().

Events::dispatch($event = new LoginAttempting());

Expand Down
2 changes: 2 additions & 0 deletions src/Controllers/LogoutControllerAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

use function sprintf;

/**
* Controller for handling a logout request.
*
Expand Down Expand Up @@ -43,7 +45,7 @@
$landing ??= '/';

if ($loggedIn) {
session()->invalidate();

Check failure on line 48 in src/Controllers/LogoutControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2)

Dynamic call to static method Illuminate\Session\Store::invalidate().

Check failure on line 48 in src/Controllers/LogoutControllerAbstract.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3)

Dynamic call to static method Illuminate\Session\Store::invalidate().

$guard->logout(); /** @phpstan-ignore-line */
$route = (string) url($landing); /** @phpstan-ignore-line */
Expand Down
1 change: 1 addition & 0 deletions src/Guards/GuardAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use function is_array;
use function is_int;
use function is_string;
use function sprintf;

/**
* @internal
Expand Down
1 change: 1 addition & 0 deletions src/UserProviderAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Support\Facades\Cache;

use function is_string;
use function sprintf;

/**
* User provider for the Auth0 user repository.
Expand Down
Loading