Files
TijdVoorDeTest/src/Controller/AbstractController.php
Marijn Doeve acf5c06fcc
Some checks failed
CI / Tests (push) Failing after 9s
CI / Docker Lint (push) Successful in 4s
Refactor code for improved readability and consistency; add flash message handling and enhance quiz functionality
2025-03-12 23:18:13 +01:00

22 lines
483 B
PHP

<?php
declare(strict_types=1);
namespace App\Controller;
use App\Enum\FlashType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as AbstractBaseController;
abstract class AbstractController extends AbstractBaseController
{
#[\Override]
protected function addFlash(FlashType|string $type, mixed $message): void
{
if ($type instanceof FlashType) {
$type = $type->value;
}
parent::addFlash($type, $message);
}
}