Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/Admin/src/Handler/Account/PostLoginAccountHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Admin\App\Plugin\FormsPlugin;
use Core\Admin\Entity\AdminIdentity;
use Core\App\Message;
use Core\App\Service\AuthenticationServiceInterface;

Check failure on line 14 in src/Admin/src/Handler/Account/PostLoginAccountHandler.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Type Core\App\Service\AuthenticationServiceInterface is not used in this file.
use Dot\DependencyInjection\Attribute\Inject;
use Dot\FlashMessenger\FlashMessengerInterface;
use Dot\Log\Logger;
Expand Down Expand Up @@ -52,7 +52,7 @@

public function handle(ServerRequestInterface $request): ResponseInterface
{
assert($this->authenticationService instanceof AuthenticationServiceInterface);
assert($this->authenticationService instanceof LaminasAuthenticationServiceInterface);

Check failure on line 55 in src/Admin/src/Handler/Account/PostLoginAccountHandler.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Instanceof between Laminas\Authentication\AuthenticationServiceInterface and Laminas\Authentication\AuthenticationServiceInterface will always evaluate to true.

Check failure on line 55 in src/Admin/src/Handler/Account/PostLoginAccountHandler.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Call to function assert() with true will always evaluate to true.
if ($this->authenticationService->hasIdentity()) {
return new RedirectResponse($this->router->generateUri('app::index-redirect'));
}
Expand Down Expand Up @@ -81,7 +81,7 @@
$serverParams = $request->getServerParams();

/** @var AuthenticationAdapter $adapter */
$adapter = $this->authenticationService->getAdapter();

Check failure on line 84 in src/Admin/src/Handler/Account/PostLoginAccountHandler.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Call to an undefined method Laminas\Authentication\AuthenticationServiceInterface::getAdapter().
$adapter->setIdentity($data['identity']);
$adapter->setCredential($data['password']);
$authResult = $this->authenticationService->authenticate();
Expand All @@ -106,7 +106,7 @@
}

$this->adminLoginService->logSuccessfulLogin($serverParams, $data['identity']);
$this->authenticationService->getStorage()->write($identity);

Check failure on line 109 in src/Admin/src/Handler/Account/PostLoginAccountHandler.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Call to an undefined method Laminas\Authentication\AuthenticationServiceInterface::getStorage().

return new RedirectResponse($this->router->generateUri('app::index-redirect'));
} catch (Throwable $exception) {
Expand Down
Loading