diff --git a/ci/qa/phpstan-baseline.php b/ci/qa/phpstan-baseline.php index 9d4c920a3..88196b8ee 100644 --- a/ci/qa/phpstan-baseline.php +++ b/ci/qa/phpstan-baseline.php @@ -301,41 +301,11 @@ 'count' => 1, 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/EntryPointController.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Instanceof between Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\HttpException and Surfnet\\\\StepupSelfService\\\\SelfServiceBundle\\\\Exception\\\\MissingRequiredAttributeException will always evaluate to false\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Surfnet\\\\StepupSelfService\\\\SelfServiceBundle\\\\Controller\\\\ExceptionController\\:\\:getPageTitleAndDescription\\(\\) return type has no value type specified in iterable type array\\.$#', 'count' => 1, 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Result of && is always false\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Undefined variable\\: \\$description$#', - 'count' => 1, - 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Undefined variable\\: \\$title$#', - 'count' => 1, - 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Variable \\$description in isset\\(\\) is never defined\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Variable \\$title in isset\\(\\) is never defined\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php', -]; $ignoreErrors[] = [ 'message' => '#^Cannot call method getIdentity\\(\\) on Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null\\.$#', 'count' => 2, diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php index 30ae4070b..2d2ecdda2 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php @@ -28,7 +28,6 @@ use Throwable; use Surfnet\StepupBundle\Controller\ExceptionController as BaseExceptionController; use Surfnet\StepupSelfService\SelfServiceBundle\Exception\MissingRequiredAttributeException; -use Symfony\Component\HttpKernel\Exception\HttpException; final class ExceptionController extends BaseExceptionController { @@ -39,7 +38,7 @@ protected function getPageTitleAndDescription(Throwable $exception): array { $translator = $this->getTranslator(); - if ($exception instanceof HttpException && $exception instanceof MissingRequiredAttributeException) { + if ($exception instanceof MissingRequiredAttributeException) { $title = $translator->trans('stepup.error.missing_required_attribute.title'); $description = $exception->getMessage(); }