diff --git a/src/AutoMapper/RestAutoMapperConfiguration.php b/src/AutoMapper/RestAutoMapperConfiguration.php index fed7bf6df..383041948 100644 --- a/src/AutoMapper/RestAutoMapperConfiguration.php +++ b/src/AutoMapper/RestAutoMapperConfiguration.php @@ -11,6 +11,7 @@ use AutoMapperPlus\AutoMapperPlusBundle\AutoMapperConfiguratorInterface; use AutoMapperPlus\Configuration\AutoMapperConfigInterface; use AutoMapperPlus\MapperInterface; +use Override; use Symfony\Component\HttpFoundation\Request; /** @@ -36,6 +37,7 @@ public function __construct( * * @psalm-suppress UndefinedThisPropertyFetch */ + #[Override] public function configure(AutoMapperConfigInterface $config): void { foreach (static::$requestMapperClasses as $requestMapperClass) { diff --git a/src/AutoMapper/RestRequestMapper.php b/src/AutoMapper/RestRequestMapper.php index 638696441..bbd349b8f 100644 --- a/src/AutoMapper/RestRequestMapper.php +++ b/src/AutoMapper/RestRequestMapper.php @@ -12,6 +12,7 @@ use AutoMapperPlus\MapperInterface; use InvalidArgumentException; use LengthException; +use Override; use ReflectionClass; use ReflectionNamedType; use Symfony\Component\HttpFoundation\Request; @@ -41,6 +42,7 @@ abstract class RestRequestMapper implements MapperInterface * @psalm-param array|object $source * @psalm-param array $context */ + #[Override] public function map($source, string $targetClass, array $context = []): RestDtoInterface { /** @psalm-var class-string $targetClass */ @@ -56,6 +58,7 @@ public function map($source, string $targetClass, array $context = []): RestDtoI * @psalm-param object $destination * @psalm-param array $context */ + #[Override] public function mapToObject($source, $destination, array $context = []): RestDtoInterface { if (!is_object($source)) { diff --git a/src/Command/ApiKey/ChangeTokenCommand.php b/src/Command/ApiKey/ChangeTokenCommand.php index 0776e8cd8..ecaffa8f9 100644 --- a/src/Command/ApiKey/ChangeTokenCommand.php +++ b/src/Command/ApiKey/ChangeTokenCommand.php @@ -11,6 +11,7 @@ use App\Command\Traits\SymfonyStyleTrait; use App\Entity\ApiKey; use App\Resource\ApiKeyResource; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -43,6 +44,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/ApiKey/CreateApiKeyCommand.php b/src/Command/ApiKey/CreateApiKeyCommand.php index 96cae3b6c..b2d49b30e 100644 --- a/src/Command/ApiKey/CreateApiKeyCommand.php +++ b/src/Command/ApiKey/CreateApiKeyCommand.php @@ -18,6 +18,7 @@ use App\Resource\UserGroupResource; use App\Security\RolesService; use Matthias\SymfonyConsoleForm\Console\Helper\FormHelper; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -65,6 +66,7 @@ public function getRolesService(): RolesService return $this->rolesService; } + #[Override] protected function configure(): void { parent::configure(); @@ -77,6 +79,7 @@ protected function configure(): void * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/ApiKey/EditApiKeyCommand.php b/src/Command/ApiKey/EditApiKeyCommand.php index 0b8d69d64..fb25986ed 100644 --- a/src/Command/ApiKey/EditApiKeyCommand.php +++ b/src/Command/ApiKey/EditApiKeyCommand.php @@ -14,6 +14,7 @@ use App\Form\Type\Console\ApiKeyType; use App\Resource\ApiKeyResource; use Matthias\SymfonyConsoleForm\Console\Helper\FormHelper; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -46,6 +47,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/ApiKey/ListApiKeysCommand.php b/src/Command/ApiKey/ListApiKeysCommand.php index 0486844a4..7edd9a188 100644 --- a/src/Command/ApiKey/ListApiKeysCommand.php +++ b/src/Command/ApiKey/ListApiKeysCommand.php @@ -13,6 +13,7 @@ use App\Resource\ApiKeyResource; use App\Security\RolesService; use Closure; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -47,6 +48,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Command/ApiKey/RemoveApiKeyCommand.php b/src/Command/ApiKey/RemoveApiKeyCommand.php index 42dea5d6f..cee78524d 100644 --- a/src/Command/ApiKey/RemoveApiKeyCommand.php +++ b/src/Command/ApiKey/RemoveApiKeyCommand.php @@ -11,6 +11,7 @@ use App\Command\Traits\SymfonyStyleTrait; use App\Entity\ApiKey; use App\Resource\ApiKeyResource; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -43,6 +44,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/User/CreateRolesCommand.php b/src/Command/User/CreateRolesCommand.php index 30bb132ba..596b13ca0 100644 --- a/src/Command/User/CreateRolesCommand.php +++ b/src/Command/User/CreateRolesCommand.php @@ -13,6 +13,7 @@ use App\Repository\RoleRepository; use App\Security\RolesService; use Doctrine\ORM\EntityManagerInterface; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -49,6 +50,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/User/CreateUserCommand.php b/src/Command/User/CreateUserCommand.php index c39d0c547..7fcbc5c32 100644 --- a/src/Command/User/CreateUserCommand.php +++ b/src/Command/User/CreateUserCommand.php @@ -18,6 +18,7 @@ use App\Resource\UserResource; use App\Security\RolesService; use Matthias\SymfonyConsoleForm\Console\Helper\FormHelper; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -87,6 +88,7 @@ public function getRolesService(): RolesService return $this->rolesService; } + #[Override] protected function configure(): void { parent::configure(); @@ -99,6 +101,7 @@ protected function configure(): void * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/User/CreateUserGroupCommand.php b/src/Command/User/CreateUserGroupCommand.php index b0bf56adb..532f6407e 100644 --- a/src/Command/User/CreateUserGroupCommand.php +++ b/src/Command/User/CreateUserGroupCommand.php @@ -16,6 +16,7 @@ use App\Repository\RoleRepository; use App\Resource\UserGroupResource; use Matthias\SymfonyConsoleForm\Console\Helper\FormHelper; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\ArrayInput; @@ -60,6 +61,7 @@ public function __construct( parent::__construct(); } + #[Override] protected function configure(): void { parent::configure(); @@ -72,6 +74,7 @@ protected function configure(): void * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/User/EditUserCommand.php b/src/Command/User/EditUserCommand.php index 9f1765d39..e245a043c 100644 --- a/src/Command/User/EditUserCommand.php +++ b/src/Command/User/EditUserCommand.php @@ -14,6 +14,7 @@ use App\Form\Type\Console\UserType; use App\Resource\UserResource; use Matthias\SymfonyConsoleForm\Console\Helper\FormHelper; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -46,6 +47,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/User/EditUserGroupCommand.php b/src/Command/User/EditUserGroupCommand.php index 211ee2246..276950269 100644 --- a/src/Command/User/EditUserGroupCommand.php +++ b/src/Command/User/EditUserGroupCommand.php @@ -14,6 +14,7 @@ use App\Form\Type\Console\UserGroupType; use App\Resource\UserGroupResource; use Matthias\SymfonyConsoleForm\Console\Helper\FormHelper; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -46,6 +47,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/User/ListUserGroupsCommand.php b/src/Command/User/ListUserGroupsCommand.php index 630d71115..0e18c5fce 100644 --- a/src/Command/User/ListUserGroupsCommand.php +++ b/src/Command/User/ListUserGroupsCommand.php @@ -13,6 +13,7 @@ use App\Entity\UserGroup; use App\Resource\UserGroupResource; use Closure; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -47,6 +48,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/User/ListUsersCommand.php b/src/Command/User/ListUsersCommand.php index 5a3d9680b..8d3c6f112 100644 --- a/src/Command/User/ListUsersCommand.php +++ b/src/Command/User/ListUsersCommand.php @@ -14,6 +14,7 @@ use App\Resource\UserResource; use App\Security\RolesService; use Closure; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -49,6 +50,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/User/RemoveUserCommand.php b/src/Command/User/RemoveUserCommand.php index 65593308f..e374e2cb1 100644 --- a/src/Command/User/RemoveUserCommand.php +++ b/src/Command/User/RemoveUserCommand.php @@ -11,6 +11,7 @@ use App\Command\Traits\SymfonyStyleTrait; use App\Entity\User; use App\Resource\UserResource; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -43,6 +44,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/User/RemoveUserGroupCommand.php b/src/Command/User/RemoveUserGroupCommand.php index 2f05720d9..7aaca00fd 100644 --- a/src/Command/User/RemoveUserGroupCommand.php +++ b/src/Command/User/RemoveUserGroupCommand.php @@ -11,6 +11,7 @@ use App\Command\Traits\SymfonyStyleTrait; use App\Entity\UserGroup; use App\Resource\UserGroupResource; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -43,6 +44,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $io = $this->getSymfonyStyle($input, $output); diff --git a/src/Command/Utils/CheckDependencies.php b/src/Command/Utils/CheckDependencies.php index 30352fe73..f8b78b6b8 100644 --- a/src/Command/Utils/CheckDependencies.php +++ b/src/Command/Utils/CheckDependencies.php @@ -12,6 +12,7 @@ use InvalidArgumentException; use JsonException; use LogicException; +use Override; use SplFileInfo; use stdClass; use Symfony\Component\Console\Attribute\AsCommand; @@ -81,6 +82,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { $onlyMinor = $input->getOption('minor'); diff --git a/src/Command/Utils/CreateDateDimensionEntitiesCommand.php b/src/Command/Utils/CreateDateDimensionEntitiesCommand.php index d6d879a7f..cb0635b20 100644 --- a/src/Command/Utils/CreateDateDimensionEntitiesCommand.php +++ b/src/Command/Utils/CreateDateDimensionEntitiesCommand.php @@ -16,6 +16,7 @@ use DateTimeImmutable; use DateTimeZone; use InvalidArgumentException; +use Override; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; @@ -49,6 +50,7 @@ public function __construct( * * @throws Throwable */ + #[Override] protected function execute(InputInterface $input, OutputInterface $output): int { // Create output decorator helpers for the Symfony Style Guide. diff --git a/src/Compiler/StopwatchCompilerPass.php b/src/Compiler/StopwatchCompilerPass.php index 199d0571d..9c1a5bde7 100644 --- a/src/Compiler/StopwatchCompilerPass.php +++ b/src/Compiler/StopwatchCompilerPass.php @@ -9,6 +9,7 @@ namespace App\Compiler; use App\Decorator\StopwatchDecorator; +use Override; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; @@ -29,6 +30,7 @@ class StopwatchCompilerPass implements CompilerPassInterface 'app.stopwatch', ]; + #[Override] public function process(ContainerBuilder $container): void { foreach (self::SERVICE_TAGS as $tag) { diff --git a/src/DTO/ApiKey/ApiKey.php b/src/DTO/ApiKey/ApiKey.php index b61d8bc96..2e8b84936 100644 --- a/src/DTO/ApiKey/ApiKey.php +++ b/src/DTO/ApiKey/ApiKey.php @@ -14,6 +14,7 @@ use App\Entity\Interfaces\UserGroupAwareInterface; use App\Entity\UserGroup as UserGroupEntity; use App\Validator\Constraints as AppAssert; +use Override; use Symfony\Component\Validator\Constraints as Assert; use function array_map; @@ -97,6 +98,7 @@ public function setUserGroups(array $userGroups): self * * @param EntityInterface|Entity $entity */ + #[Override] public function load(EntityInterface $entity): self { if ($entity instanceof Entity) { diff --git a/src/DTO/RestDto.php b/src/DTO/RestDto.php index d688107bb..978c51145 100644 --- a/src/DTO/RestDto.php +++ b/src/DTO/RestDto.php @@ -11,6 +11,7 @@ use App\Entity\Interfaces\EntityInterface; use BadMethodCallException; use LogicException; +use Override; use function array_filter; use function array_key_exists; use function count; @@ -51,6 +52,7 @@ abstract class RestDto implements RestDtoInterface */ private array $visited = []; + #[Override] public function setId(string $id): self { $this->setVisited('id'); @@ -65,11 +67,13 @@ public function getId(): ?string return $this->id; } + #[Override] public function getVisited(): array { return array_filter($this->visited, static fn (string $property): bool => $property !== 'id'); } + #[Override] public function setVisited(string $property): self { $this->visited[] = $property; @@ -77,6 +81,7 @@ public function setVisited(string $property): self return $this; } + #[Override] public function update(EntityInterface $entity): EntityInterface { foreach ($this->getVisited() as $property) { @@ -96,6 +101,7 @@ public function update(EntityInterface $entity): EntityInterface return $entity; } + #[Override] public function patch(RestDtoInterface $dto): self { foreach ($dto->getVisited() as $property) { diff --git a/src/DTO/User/User.php b/src/DTO/User/User.php index 51cf31a8b..90eaf9117 100644 --- a/src/DTO/User/User.php +++ b/src/DTO/User/User.php @@ -17,6 +17,7 @@ use App\Enum\Locale; use App\Service\Localization; use App\Validator\Constraints as AppAssert; +use Override; use Symfony\Component\Validator\Constraints as Assert; use function array_map; @@ -226,6 +227,7 @@ public function setPassword(?string $password = null): self * * @param EntityInterface|Entity $entity */ + #[Override] public function load(EntityInterface $entity): self { if ($entity instanceof Entity) { diff --git a/src/DTO/UserGroup/UserGroup.php b/src/DTO/UserGroup/UserGroup.php index 4531cb76f..3551439e4 100644 --- a/src/DTO/UserGroup/UserGroup.php +++ b/src/DTO/UserGroup/UserGroup.php @@ -13,6 +13,7 @@ use App\Entity\Role as RoleEntity; use App\Entity\UserGroup as Entity; use App\Validator\Constraints as AppAssert; +use Override; use Symfony\Component\Validator\Constraints as Assert; /** @@ -64,6 +65,7 @@ public function setRole(RoleEntity $role): self * * @param EntityInterface|Entity $entity */ + #[Override] public function load(EntityInterface $entity): self { if ($entity instanceof Entity) { diff --git a/src/DataFixtures/AppFixtures.php b/src/DataFixtures/AppFixtures.php index 9f599fc6c..6212e83e9 100644 --- a/src/DataFixtures/AppFixtures.php +++ b/src/DataFixtures/AppFixtures.php @@ -10,6 +10,7 @@ use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Persistence\ObjectManager; +use Override; /** * @package App\DataFixtures @@ -17,6 +18,7 @@ */ class AppFixtures extends Fixture { + #[Override] public function load(ObjectManager $manager): void { $manager->flush(); diff --git a/src/DataFixtures/ORM/LoadApiKeyData.php b/src/DataFixtures/ORM/LoadApiKeyData.php index f2afcba73..6c9effe5a 100644 --- a/src/DataFixtures/ORM/LoadApiKeyData.php +++ b/src/DataFixtures/ORM/LoadApiKeyData.php @@ -16,6 +16,7 @@ use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Persistence\ObjectManager; +use Override; use Throwable; use function array_map; use function str_pad; @@ -48,6 +49,7 @@ public function __construct( /** * @throws Throwable */ + #[Override] public function load(ObjectManager $manager): void { // Create entities @@ -63,6 +65,7 @@ public function load(ObjectManager $manager): void $manager->flush(); } + #[Override] public function getOrder(): int { return 4; diff --git a/src/DataFixtures/ORM/LoadRoleData.php b/src/DataFixtures/ORM/LoadRoleData.php index 0fc7f20dd..4c98ba698 100644 --- a/src/DataFixtures/ORM/LoadRoleData.php +++ b/src/DataFixtures/ORM/LoadRoleData.php @@ -13,6 +13,7 @@ use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Persistence\ObjectManager; +use Override; use Throwable; use function array_map; @@ -32,6 +33,7 @@ public function __construct( /** * @throws Throwable */ + #[Override] public function load(ObjectManager $manager): void { // Create entities @@ -41,6 +43,7 @@ public function load(ObjectManager $manager): void $manager->flush(); } + #[Override] public function getOrder(): int { return 1; diff --git a/src/DataFixtures/ORM/LoadUserData.php b/src/DataFixtures/ORM/LoadUserData.php index ffa6fd8b8..3086286b5 100644 --- a/src/DataFixtures/ORM/LoadUserData.php +++ b/src/DataFixtures/ORM/LoadUserData.php @@ -18,6 +18,7 @@ use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Persistence\ObjectManager; +use Override; use Throwable; use function array_map; @@ -49,6 +50,7 @@ public function __construct( /** * @throws Throwable */ + #[Override] public function load(ObjectManager $manager): void { // Create entities @@ -64,6 +66,7 @@ public function load(ObjectManager $manager): void $manager->flush(); } + #[Override] public function getOrder(): int { return 3; diff --git a/src/DataFixtures/ORM/LoadUserGroupData.php b/src/DataFixtures/ORM/LoadUserGroupData.php index 5a53d0a5e..f062f9391 100644 --- a/src/DataFixtures/ORM/LoadUserGroupData.php +++ b/src/DataFixtures/ORM/LoadUserGroupData.php @@ -16,6 +16,7 @@ use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Persistence\ObjectManager; +use Override; use Throwable; use function array_map; @@ -46,6 +47,7 @@ public function __construct( /** * @throws Throwable */ + #[Override] public function load(ObjectManager $manager): void { // Create entities @@ -55,6 +57,7 @@ public function load(ObjectManager $manager): void $manager->flush(); } + #[Override] public function getOrder(): int { return 2; diff --git a/src/Doctrine/DBAL/Types/EnumType.php b/src/Doctrine/DBAL/Types/EnumType.php index 37f888319..a2e06e0dc 100644 --- a/src/Doctrine/DBAL/Types/EnumType.php +++ b/src/Doctrine/DBAL/Types/EnumType.php @@ -14,6 +14,7 @@ use Doctrine\DBAL\Types\ConversionException; use Doctrine\DBAL\Types\Type; use InvalidArgumentException; +use Override; use function array_map; use function gettype; use function implode; @@ -41,6 +42,7 @@ public static function getValues(): array return static::$enum::getValues(); } + #[Override] public function getSQLDeclaration(array $column, AbstractPlatform $platform): string { $enumDefinition = implode( @@ -54,6 +56,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st /** * @inheritDoc */ + #[Override] public function convertToDatabaseValue($value, AbstractPlatform $platform): string { if (is_string($value) && in_array($value, static::$enum::getValues(), true)) { @@ -76,6 +79,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): stri /** * @inheritDoc */ + #[Override] public function convertToPHPValue($value, AbstractPlatform $platform): DatabaseEnumInterface { $value = (string)parent::convertToPHPValue($value, $platform); @@ -97,6 +101,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform): DatabaseE * * @codeCoverageIgnore */ + #[Override] public function getName(): string { return ''; diff --git a/src/Doctrine/DBAL/Types/UTCDateTimeType.php b/src/Doctrine/DBAL/Types/UTCDateTimeType.php index d06348af2..8273e01c5 100644 --- a/src/Doctrine/DBAL/Types/UTCDateTimeType.php +++ b/src/Doctrine/DBAL/Types/UTCDateTimeType.php @@ -15,6 +15,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Types\ConversionException; use Doctrine\DBAL\Types\DateTimeType; +use Override; /** * @see http://doctrine-orm.readthedocs.org/en/latest/cookbook/working-with-datetime.html @@ -31,6 +32,7 @@ class UTCDateTimeType extends DateTimeType * * @throws ConversionException */ + #[Override] public function convertToDatabaseValue($value, AbstractPlatform $platform): string { if ($value instanceof DateTime) { @@ -50,6 +52,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): stri * @throws ConversionException * @throws Exception */ + #[Override] public function convertToPHPValue($value, AbstractPlatform $platform): DateTimeInterface|null { if ($value instanceof DateTime) { diff --git a/src/Entity/ApiKey.php b/src/Entity/ApiKey.php index 705688731..dcdcce37f 100644 --- a/src/Entity/ApiKey.php +++ b/src/Entity/ApiKey.php @@ -19,6 +19,7 @@ use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; use OpenApi\Attributes as OA; +use Override; use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType; use Ramsey\Uuid\UuidInterface; use Symfony\Bridge\Doctrine\Validator\Constraints as AssertCollection; @@ -136,6 +137,7 @@ public function __construct() $this->generateToken(); } + #[Override] public function getId(): string { return $this->id->toString(); @@ -178,6 +180,7 @@ public function setDescription(string $description): self * * @return Collection|ArrayCollection */ + #[Override] public function getUserGroups(): Collection | ArrayCollection { return $this->userGroups; @@ -218,6 +221,7 @@ public function getRoles(): array ); } + #[Override] public function addUserGroup(UserGroup $userGroup): self { if ($this->userGroups->contains($userGroup) === false) { @@ -228,6 +232,7 @@ public function addUserGroup(UserGroup $userGroup): self return $this; } + #[Override] public function removeUserGroup(UserGroup $userGroup): self { if ($this->userGroups->removeElement($userGroup)) { @@ -237,6 +242,7 @@ public function removeUserGroup(UserGroup $userGroup): self return $this; } + #[Override] public function clearUserGroups(): self { $this->userGroups->clear(); diff --git a/src/Entity/DateDimension.php b/src/Entity/DateDimension.php index cb406b4aa..f9f41142d 100644 --- a/src/Entity/DateDimension.php +++ b/src/Entity/DateDimension.php @@ -16,6 +16,7 @@ use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; use OpenApi\Attributes as OA; +use Override; use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType; use Ramsey\Uuid\UuidInterface; use Symfony\Component\Serializer\Annotation\Groups; @@ -211,6 +212,7 @@ public function __construct( $this->unixTime = $date->format('U'); } + #[Override] public function getId(): string { return $this->id->toString(); @@ -274,6 +276,7 @@ public function getUnixTime(): string /** * @throws Throwable */ + #[Override] public function getCreatedAt(): DateTimeImmutable { $output = DateTimeImmutable::createFromFormat('U', $this->getUnixTime(), new DateTimeZone('UTC')); diff --git a/src/Entity/Healthz.php b/src/Entity/Healthz.php index a8a7e0cb6..819201494 100644 --- a/src/Entity/Healthz.php +++ b/src/Entity/Healthz.php @@ -15,6 +15,7 @@ use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; use OpenApi\Attributes as OA; +use Override; use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType; use Ramsey\Uuid\UuidInterface; use Symfony\Component\Serializer\Annotation\Groups; @@ -65,6 +66,7 @@ public function __construct() $this->timestamp = new DateTimeImmutable(timezone: new DateTimeZone('UTC')); } + #[Override] public function getId(): string { return $this->id->toString(); @@ -82,6 +84,7 @@ public function setTimestamp(DateTimeImmutable $timestamp): self return $this; } + #[Override] public function getCreatedAt(): DateTimeImmutable { return $this->timestamp; diff --git a/src/Entity/LogLogin.php b/src/Entity/LogLogin.php index 8f4814c38..7b61d3451 100644 --- a/src/Entity/LogLogin.php +++ b/src/Entity/LogLogin.php @@ -16,6 +16,7 @@ use DeviceDetector\DeviceDetector; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; +use Override; use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType; use Ramsey\Uuid\UuidInterface; use Symfony\Component\HttpFoundation\Request; @@ -261,6 +262,7 @@ public function __construct( } } + #[Override] public function getId(): string { return $this->id->toString(); diff --git a/src/Entity/LogLoginFailure.php b/src/Entity/LogLoginFailure.php index f264c6494..6a44e912c 100644 --- a/src/Entity/LogLoginFailure.php +++ b/src/Entity/LogLoginFailure.php @@ -14,6 +14,7 @@ use DateTimeZone; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; +use Override; use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType; use Ramsey\Uuid\UuidInterface; use Symfony\Component\Serializer\Annotation\Groups; @@ -85,6 +86,7 @@ public function __construct( $this->timestamp = new DateTimeImmutable(timezone: new DateTimeZone('UTC')); } + #[Override] public function getId(): string { return $this->id->toString(); @@ -100,6 +102,7 @@ public function getTimestamp(): DateTimeImmutable return $this->getCreatedAt(); } + #[Override] public function getCreatedAt(): DateTimeImmutable { return $this->timestamp; diff --git a/src/Entity/LogRequest.php b/src/Entity/LogRequest.php index f547911e0..de19ebe81 100644 --- a/src/Entity/LogRequest.php +++ b/src/Entity/LogRequest.php @@ -15,6 +15,7 @@ use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; use OpenApi\Attributes as OA; +use Override; use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType; use Ramsey\Uuid\UuidInterface; use Symfony\Component\HttpFoundation\Request; @@ -155,6 +156,7 @@ public function __construct( } } + #[Override] public function getId(): string { return $this->id->toString(); diff --git a/src/Entity/Role.php b/src/Entity/Role.php index e02f79252..e5bc5d0ca 100644 --- a/src/Entity/Role.php +++ b/src/Entity/Role.php @@ -15,6 +15,7 @@ use Doctrine\Common\Collections\Collection; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; +use Override; use Symfony\Component\Serializer\Annotation\Groups; /** @@ -84,6 +85,7 @@ public function __construct( $this->userGroups = new ArrayCollection(); } + #[Override] public function getId(): string { return $this->id; diff --git a/src/Entity/User.php b/src/Entity/User.php index 20d8729a2..ab8b9c257 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -23,6 +23,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; +use Override; use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType; use Ramsey\Uuid\UuidInterface; use Symfony\Bridge\Doctrine\Validator\Constraints as AssertCollection; @@ -255,11 +256,13 @@ public function __construct() $this->logsLoginFailure = new ArrayCollection(); } + #[Override] public function getId(): string { return $this->id->toString(); } + #[Override] public function getUsername(): string { return $this->username; @@ -296,6 +299,7 @@ public function setLastName(string $lastName): self return $this; } + #[Override] public function getEmail(): string { return $this->email; diff --git a/src/Entity/UserGroup.php b/src/Entity/UserGroup.php index 1da196a84..44fb98dc6 100644 --- a/src/Entity/UserGroup.php +++ b/src/Entity/UserGroup.php @@ -16,6 +16,7 @@ use Doctrine\Common\Collections\Collection; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; +use Override; use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType; use Ramsey\Uuid\UuidInterface; use Stringable; @@ -140,11 +141,13 @@ public function __construct() $this->apiKeys = new ArrayCollection(); } + #[Override] public function __toString(): string { return self::class; } + #[Override] public function getId(): string { return $this->id->toString(); diff --git a/src/EventSubscriber/AcceptLanguageSubscriber.php b/src/EventSubscriber/AcceptLanguageSubscriber.php index 4ab025e9d..8c084288b 100644 --- a/src/EventSubscriber/AcceptLanguageSubscriber.php +++ b/src/EventSubscriber/AcceptLanguageSubscriber.php @@ -9,6 +9,7 @@ namespace App\EventSubscriber; use App\Enum\Language; +use Override; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\RequestEvent; @@ -26,6 +27,7 @@ public function __construct( ) { } + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/AuthenticationFailureSubscriber.php b/src/EventSubscriber/AuthenticationFailureSubscriber.php index bb304dde6..71d65af41 100644 --- a/src/EventSubscriber/AuthenticationFailureSubscriber.php +++ b/src/EventSubscriber/AuthenticationFailureSubscriber.php @@ -13,6 +13,7 @@ use App\Utils\LoginLogger; use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationFailureEvent; use Lexik\Bundle\JWTAuthenticationBundle\Events; +use Override; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Throwable; @@ -33,6 +34,7 @@ public function __construct( * * @return array */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/AuthenticationSuccessSubscriber.php b/src/EventSubscriber/AuthenticationSuccessSubscriber.php index e4447ec9f..73bfab696 100644 --- a/src/EventSubscriber/AuthenticationSuccessSubscriber.php +++ b/src/EventSubscriber/AuthenticationSuccessSubscriber.php @@ -13,6 +13,7 @@ use App\Utils\LoginLogger; use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationSuccessEvent; use Lexik\Bundle\JWTAuthenticationBundle\Events; +use Override; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Throwable; @@ -33,6 +34,7 @@ public function __construct( * * @return array */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/BodySubscriber.php b/src/EventSubscriber/BodySubscriber.php index 2b0fd8476..1b02f2e93 100644 --- a/src/EventSubscriber/BodySubscriber.php +++ b/src/EventSubscriber/BodySubscriber.php @@ -10,6 +10,7 @@ use App\Utils\JSON; use JsonException; +use Override; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Event\RequestEvent; @@ -25,6 +26,7 @@ class BodySubscriber implements EventSubscriberInterface /** * {@inheritdoc} */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/DoctrineExtensionSubscriber.php b/src/EventSubscriber/DoctrineExtensionSubscriber.php index dec5b31a8..9cc1ad9d1 100644 --- a/src/EventSubscriber/DoctrineExtensionSubscriber.php +++ b/src/EventSubscriber/DoctrineExtensionSubscriber.php @@ -11,6 +11,7 @@ use App\Security\UserTypeIdentification; use Doctrine\ORM\NonUniqueResultException; use Gedmo\Blameable\BlameableListener; +use Override; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\RequestEvent; @@ -31,6 +32,7 @@ public function __construct( * * @return array */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/ExceptionSubscriber.php b/src/EventSubscriber/ExceptionSubscriber.php index 135d345b9..b3d92fb3b 100644 --- a/src/EventSubscriber/ExceptionSubscriber.php +++ b/src/EventSubscriber/ExceptionSubscriber.php @@ -14,6 +14,7 @@ use Doctrine\DBAL\Exception; use Doctrine\ORM\Exception\ORMException; use JsonException; +use Override; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -60,6 +61,7 @@ public function __construct( /** * {@inheritdoc} */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/JWTCreatedSubscriber.php b/src/EventSubscriber/JWTCreatedSubscriber.php index 6b4241419..7fbe5f970 100644 --- a/src/EventSubscriber/JWTCreatedSubscriber.php +++ b/src/EventSubscriber/JWTCreatedSubscriber.php @@ -16,6 +16,7 @@ use DateTimeZone; use Lexik\Bundle\JWTAuthenticationBundle\Event\JWTCreatedEvent; use Lexik\Bundle\JWTAuthenticationBundle\Events; +use Override; use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\RequestStack; @@ -40,6 +41,7 @@ public function __construct( * * @return array */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/JWTDecodedSubscriber.php b/src/EventSubscriber/JWTDecodedSubscriber.php index 386e6cb02..bd9f32d15 100644 --- a/src/EventSubscriber/JWTDecodedSubscriber.php +++ b/src/EventSubscriber/JWTDecodedSubscriber.php @@ -10,6 +10,7 @@ use Lexik\Bundle\JWTAuthenticationBundle\Event\JWTDecodedEvent; use Lexik\Bundle\JWTAuthenticationBundle\Events; +use Override; use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; @@ -35,6 +36,7 @@ public function __construct( * * @return array */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/LockedUserSubscriber.php b/src/EventSubscriber/LockedUserSubscriber.php index 697133665..df4e424c1 100644 --- a/src/EventSubscriber/LockedUserSubscriber.php +++ b/src/EventSubscriber/LockedUserSubscriber.php @@ -16,6 +16,7 @@ use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationFailureEvent; use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationSuccessEvent; use Lexik\Bundle\JWTAuthenticationBundle\Events; +use Override; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; @@ -42,6 +43,7 @@ public function __construct( /** * {@inheritdoc} */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/RequestLogSubscriber.php b/src/EventSubscriber/RequestLogSubscriber.php index 4d028e57e..18b1cfd56 100644 --- a/src/EventSubscriber/RequestLogSubscriber.php +++ b/src/EventSubscriber/RequestLogSubscriber.php @@ -12,6 +12,7 @@ use App\Security\SecurityUser; use App\Security\UserTypeIdentification; use App\Utils\RequestLogger; +use Override; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; @@ -45,6 +46,7 @@ public function __construct( /** * {@inheritdoc} */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/EventSubscriber/ResponseSubscriber.php b/src/EventSubscriber/ResponseSubscriber.php index c8a8f021f..82529c414 100644 --- a/src/EventSubscriber/ResponseSubscriber.php +++ b/src/EventSubscriber/ResponseSubscriber.php @@ -9,6 +9,7 @@ namespace App\EventSubscriber; use App\Service\Version; +use Override; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\ResponseEvent; @@ -26,6 +27,7 @@ public function __construct( /** * {@inheritdoc} */ + #[Override] public static function getSubscribedEvents(): array { return [ diff --git a/src/Exception/ValidatorException.php b/src/Exception/ValidatorException.php index ecaa5010d..174166732 100644 --- a/src/Exception/ValidatorException.php +++ b/src/Exception/ValidatorException.php @@ -12,6 +12,7 @@ use App\Exception\models\ValidatorError; use App\Utils\JSON; use JsonException; +use Override; use Symfony\Component\Validator\ConstraintViolationInterface; use Symfony\Component\Validator\ConstraintViolationListInterface; use Symfony\Component\Validator\Exception\ValidatorException as BaseValidatorException; @@ -40,6 +41,7 @@ public function __construct(string $target, ConstraintViolationListInterface $er ); } + #[Override] public function getStatusCode(): int { return 400; diff --git a/src/Form/DataTransformer/RoleTransformer.php b/src/Form/DataTransformer/RoleTransformer.php index 7779dfbac..f284d5dcd 100644 --- a/src/Form/DataTransformer/RoleTransformer.php +++ b/src/Form/DataTransformer/RoleTransformer.php @@ -10,6 +10,7 @@ use App\Entity\Role; use App\Resource\RoleResource; +use Override; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\TransformationFailedException; use Throwable; @@ -36,6 +37,7 @@ public function __construct( * * @psalm-param Role|mixed $value */ + #[Override] public function transform(mixed $value): string { return $value instanceof Role ? $value->getId() : ''; @@ -50,6 +52,7 @@ public function transform(mixed $value): string * * @throws Throwable */ + #[Override] public function reverseTransform(mixed $value): ?Role { return is_string($value) diff --git a/src/Form/DataTransformer/UserGroupTransformer.php b/src/Form/DataTransformer/UserGroupTransformer.php index 7bfb581d4..b06c10b8b 100644 --- a/src/Form/DataTransformer/UserGroupTransformer.php +++ b/src/Form/DataTransformer/UserGroupTransformer.php @@ -10,6 +10,7 @@ use App\Entity\UserGroup; use App\Resource\UserGroupResource; +use Override; use Stringable; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\TransformationFailedException; @@ -40,6 +41,7 @@ public function __construct( * @psalm-param array|mixed $value * @psalm-return array */ + #[Override] public function transform(mixed $value): array { $callback = static fn (UserGroup | Stringable $userGroup): string => @@ -59,6 +61,7 @@ public function transform(mixed $value): array * * @throws Throwable */ + #[Override] public function reverseTransform(mixed $value): ?array { return is_array($value) diff --git a/src/Form/Type/Console/ApiKeyType.php b/src/Form/Type/Console/ApiKeyType.php index 34313d76e..d5bb53740 100644 --- a/src/Form/Type/Console/ApiKeyType.php +++ b/src/Form/Type/Console/ApiKeyType.php @@ -14,6 +14,7 @@ use App\Form\Type\Traits\AddBasicFieldToForm; use App\Form\Type\Traits\UserGroupChoices; use App\Resource\UserGroupResource; +use Override; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type; use Symfony\Component\Form\FormBuilderInterface; @@ -59,6 +60,7 @@ public function __construct( * * @throws Throwable */ + #[Override] public function buildForm(FormBuilderInterface $builder, array $options): void { parent::buildForm($builder, $options); @@ -80,6 +82,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void $builder->get('userGroups')->addModelTransformer($this->userGroupTransformer); } + #[Override] public function configureOptions(OptionsResolver $resolver): void { parent::configureOptions($resolver); diff --git a/src/Form/Type/Console/UserGroupType.php b/src/Form/Type/Console/UserGroupType.php index 8529d7003..90f0d774f 100644 --- a/src/Form/Type/Console/UserGroupType.php +++ b/src/Form/Type/Console/UserGroupType.php @@ -15,6 +15,7 @@ use App\Form\Type\Traits\AddBasicFieldToForm; use App\Resource\RoleResource; use App\Security\RolesService; +use Override; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type; use Symfony\Component\Form\FormBuilderInterface; @@ -60,6 +61,7 @@ public function __construct( * * @throws Throwable */ + #[Override] public function buildForm(FormBuilderInterface $builder, array $options): void { parent::buildForm($builder, $options); @@ -80,6 +82,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void $builder->get('role')->addModelTransformer($this->roleTransformer); } + #[Override] public function configureOptions(OptionsResolver $resolver): void { parent::configureOptions($resolver); diff --git a/src/Form/Type/Console/UserType.php b/src/Form/Type/Console/UserType.php index 974e79953..76f1ce9f0 100644 --- a/src/Form/Type/Console/UserType.php +++ b/src/Form/Type/Console/UserType.php @@ -17,6 +17,7 @@ use App\Form\Type\Traits\UserGroupChoices; use App\Resource\UserGroupResource; use App\Service\Localization; +use Override; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type; use Symfony\Component\Form\FormBuilderInterface; @@ -108,6 +109,7 @@ public function __construct( * * @throws Throwable */ + #[Override] public function buildForm(FormBuilderInterface $builder, array $options): void { parent::buildForm($builder, $options); @@ -137,6 +139,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void * * @throws AccessException */ + #[Override] public function configureOptions(OptionsResolver $resolver): void { parent::configureOptions($resolver); diff --git a/src/Kernel.php b/src/Kernel.php index bcc6546cd..20ae982a1 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -7,6 +7,7 @@ namespace App; use App\Compiler\StopwatchCompilerPass; +use Override; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Kernel as BaseKernel; @@ -18,6 +19,7 @@ class Kernel extends BaseKernel { use MicroKernelTrait; + #[Override] protected function build(ContainerBuilder $container): void { parent::build($container); diff --git a/src/Repository/BaseRepository.php b/src/Repository/BaseRepository.php index d5968b244..6ab2b4d07 100644 --- a/src/Repository/BaseRepository.php +++ b/src/Repository/BaseRepository.php @@ -15,6 +15,7 @@ use Doctrine\ORM\EntityManager; use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ManagerRegistry; +use Override; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; use function array_map; use function array_unshift; @@ -82,16 +83,19 @@ abstract class BaseRepository implements BaseRepositoryInterface /** * @psalm-return class-string */ + #[Override] public function getEntityName(): string { return static::$entityName; } + #[Override] public function getSearchColumns(): array { return static::$searchColumns; } + #[Override] public function save(EntityInterface $entity, ?bool $flush = null): self { $flush ??= true; @@ -106,6 +110,7 @@ public function save(EntityInterface $entity, ?bool $flush = null): self return $this; } + #[Override] public function remove(EntityInterface $entity, ?bool $flush = null): self { $flush ??= true; @@ -120,6 +125,7 @@ public function remove(EntityInterface $entity, ?bool $flush = null): self return $this; } + #[Override] public function processQueryBuilder(QueryBuilder $queryBuilder): void { // Reset processed joins and callbacks @@ -133,6 +139,7 @@ public function processQueryBuilder(QueryBuilder $queryBuilder): void $this->processCallbacks($queryBuilder); } + #[Override] public function addLeftJoin(array $parameters): self { if ($parameters !== []) { @@ -142,6 +149,7 @@ public function addLeftJoin(array $parameters): self return $this; } + #[Override] public function addInnerJoin(array $parameters): self { if ($parameters !== []) { @@ -151,6 +159,7 @@ public function addInnerJoin(array $parameters): self return $this; } + #[Override] public function addCallback(callable $callable, ?array $args = null): self { $args ??= []; diff --git a/src/Rest/Controller.php b/src/Rest/Controller.php index d6a933027..e7c0f57f0 100644 --- a/src/Rest/Controller.php +++ b/src/Rest/Controller.php @@ -13,6 +13,7 @@ use App\Rest\Interfaces\RestResourceInterface; use App\Rest\Traits\Actions\RestActionBase; use App\Rest\Traits\RestMethodHelper; +use Override; use Symfony\Contracts\Service\Attribute\Required; use UnexpectedValueException; @@ -52,17 +53,20 @@ public function __construct( ) { } + #[Override] public function getResource(): RestResourceInterface { return $this->resource ?? throw new UnexpectedValueException('Resource service not set', 500); } + #[Override] public function getResponseHandler(): ResponseHandlerInterface { return $this->responseHandler ?? throw new UnexpectedValueException('ResponseHandler service not set', 500); } #[Required] + #[Override] public function setResponseHandler(ResponseHandler $responseHandler): static { $this->responseHandler = $responseHandler; diff --git a/src/Rest/ResponseHandler.php b/src/Rest/ResponseHandler.php index 7849003ad..5de7ac860 100644 --- a/src/Rest/ResponseHandler.php +++ b/src/Rest/ResponseHandler.php @@ -10,6 +10,7 @@ use App\Rest\Interfaces\ResponseHandlerInterface; use App\Rest\Interfaces\RestResourceInterface; +use Override; use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\Request; @@ -50,6 +51,7 @@ public function __construct( ) { } + #[Override] public function getSerializer(): SerializerInterface { return $this->serializer; @@ -60,6 +62,7 @@ public function getSerializer(): SerializerInterface * * @throws Throwable */ + #[Override] public function getSerializeContext(Request $request, ?RestResourceInterface $restResource = null): array { /** @@ -104,6 +107,7 @@ public function getSerializeContext(Request $request, ?RestResourceInterface $re /** * @throws Throwable */ + #[Override] public function createResponse( Request $request, mixed $data, @@ -123,6 +127,7 @@ public function createResponse( return $response; } + #[Override] public function handleFormError(FormInterface $form): void { $errors = []; diff --git a/src/Rest/RestResource.php b/src/Rest/RestResource.php index d3819c5e5..d8c196329 100644 --- a/src/Rest/RestResource.php +++ b/src/Rest/RestResource.php @@ -11,6 +11,7 @@ use App\DTO\RestDtoInterface; use App\Repository\Interfaces\BaseRepositoryInterface; use App\Rest\Interfaces\RestResourceInterface; +use Override; use Symfony\Component\Validator\Validator\ValidatorInterface; use Symfony\Contracts\Service\Attribute\Required; use UnexpectedValueException; @@ -33,22 +34,26 @@ public function __construct( ) { } + #[Override] public function getSerializerContext(): array { return []; } + #[Override] public function getRepository(): BaseRepositoryInterface { return $this->repository; } + #[Override] public function getValidator(): ValidatorInterface { return $this->validator; } #[Required] + #[Override] public function setValidator(ValidatorInterface $validator): self { $this->validator = $validator; @@ -56,6 +61,7 @@ public function setValidator(ValidatorInterface $validator): self return $this; } + #[Override] public function getDtoClass(): string { if ($this->dtoClass === '') { @@ -70,6 +76,7 @@ public function getDtoClass(): string return $this->dtoClass; } + #[Override] public function setDtoClass(string $dtoClass): RestResourceInterface { $this->dtoClass = $dtoClass; @@ -77,21 +84,25 @@ public function setDtoClass(string $dtoClass): RestResourceInterface return $this; } + #[Override] public function getEntityName(): string { return $this->getRepository()->getEntityName(); } + #[Override] public function getReference(string $id): ?object { return $this->getRepository()->getReference($id); } + #[Override] public function getAssociations(): array { return array_keys($this->getRepository()->getAssociations()); } + #[Override] public function getDtoForEntity( string $id, string $dtoClass, diff --git a/src/Rest/SearchTerm.php b/src/Rest/SearchTerm.php index 154b74895..8ff08469d 100644 --- a/src/Rest/SearchTerm.php +++ b/src/Rest/SearchTerm.php @@ -10,6 +10,7 @@ use App\Rest\Interfaces\SearchTermInterface; use Closure; +use Override; use function array_filter; use function array_map; use function array_merge; @@ -30,6 +31,7 @@ */ final class SearchTerm implements SearchTermInterface { + #[Override] public static function getCriteria( array | string | null $column, array | string | null $search, diff --git a/src/Security/ApiKeyUser.php b/src/Security/ApiKeyUser.php index cf6681f2f..842696595 100644 --- a/src/Security/ApiKeyUser.php +++ b/src/Security/ApiKeyUser.php @@ -11,6 +11,7 @@ use App\Entity\ApiKey; use App\Enum\Role; use App\Security\Interfaces\ApiKeyUserInterface; +use Override; use Symfony\Component\Security\Core\User\UserInterface; use function array_unique; @@ -38,6 +39,7 @@ public function __construct(ApiKey $apiKey, array $roles) $this->roles = array_unique([...$roles, Role::API->value]); } + #[Override] public function getUserIdentifier(): string { return $this->identifier; @@ -48,6 +50,7 @@ public function getApiKeyIdentifier(): string return $this->apiKeyIdentifier; } + #[Override] public function getRoles(): array { return $this->roles; @@ -72,6 +75,7 @@ public function getSalt(): ?string /** * @codeCoverageIgnore */ + #[Override] public function eraseCredentials(): void { } diff --git a/src/Security/Authenticator/ApiKeyAuthenticator.php b/src/Security/Authenticator/ApiKeyAuthenticator.php index de43a6fbe..7fd2de537 100644 --- a/src/Security/Authenticator/ApiKeyAuthenticator.php +++ b/src/Security/Authenticator/ApiKeyAuthenticator.php @@ -9,6 +9,7 @@ namespace App\Security\Authenticator; use App\Security\Provider\ApiKeyUserProvider; +use Override; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -32,11 +33,13 @@ public function __construct( ) { } + #[Override] public function supports(Request $request): ?bool { return $this->getToken($request) !== ''; } + #[Override] public function authenticate(Request $request): Passport { $token = $this->getToken($request); @@ -49,11 +52,13 @@ public function authenticate(Request $request): Passport return new SelfValidatingPassport(new UserBadge($token)); } + #[Override] public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response { return null; } + #[Override] public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response { $data = [ diff --git a/src/Security/Handler/TranslatedAuthenticationFailureHandler.php b/src/Security/Handler/TranslatedAuthenticationFailureHandler.php index 65b48f401..d7f8a8833 100644 --- a/src/Security/Handler/TranslatedAuthenticationFailureHandler.php +++ b/src/Security/Handler/TranslatedAuthenticationFailureHandler.php @@ -11,6 +11,7 @@ use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationFailureEvent; use Lexik\Bundle\JWTAuthenticationBundle\Response\JWTAuthenticationFailureResponse; use Lexik\Bundle\JWTAuthenticationBundle\Security\Http\Authentication\AuthenticationFailureHandler; +use Override; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Exception\AuthenticationException; @@ -37,6 +38,7 @@ public function __construct( * * @noinspection PhpMissingParentCallCommonInspection */ + #[Override] public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response { /** diff --git a/src/Security/Provider/ApiKeyUserProvider.php b/src/Security/Provider/ApiKeyUserProvider.php index 3e35e6783..74affe1a5 100644 --- a/src/Security/Provider/ApiKeyUserProvider.php +++ b/src/Security/Provider/ApiKeyUserProvider.php @@ -13,6 +13,7 @@ use App\Security\ApiKeyUser; use App\Security\Interfaces\ApiKeyUserProviderInterface; use App\Security\RolesService; +use Override; use Symfony\Component\Security\Core\Exception\UnsupportedUserException; use Symfony\Component\Security\Core\Exception\UserNotFoundException; use Symfony\Component\Security\Core\User\UserInterface; @@ -32,11 +33,13 @@ public function __construct( ) { } + #[Override] public function supportsClass(string $class): bool { return $class === ApiKeyUser::class; } + #[Override] public function loadUserByIdentifier(string $identifier): ApiKeyUser { $apiKey = $this->getApiKeyForToken($identifier); @@ -48,11 +51,13 @@ public function loadUserByIdentifier(string $identifier): ApiKeyUser return new ApiKeyUser($apiKey, $this->rolesService->getInheritedRoles($apiKey->getRoles())); } + #[Override] public function refreshUser(UserInterface $user): UserInterface { throw new UnsupportedUserException('API key cannot refresh user'); } + #[Override] public function getApiKeyForToken(string $token): ?ApiKey { return $this->apiKeyRepository->findOneBy([ diff --git a/src/Security/Provider/SecurityUserFactory.php b/src/Security/Provider/SecurityUserFactory.php index 14eae046f..a3d715222 100644 --- a/src/Security/Provider/SecurityUserFactory.php +++ b/src/Security/Provider/SecurityUserFactory.php @@ -12,6 +12,7 @@ use App\Repository\UserRepository; use App\Security\RolesService; use App\Security\SecurityUser; +use Override; use Symfony\Component\Routing\Requirement\Requirement; use Symfony\Component\Security\Core\Exception\UnsupportedUserException; use Symfony\Component\Security\Core\Exception\UserNotFoundException; @@ -33,6 +34,7 @@ public function __construct( ) { } + #[Override] public function supportsClass(string $class): bool { return $class === SecurityUser::class; @@ -43,6 +45,7 @@ public function supportsClass(string $class): bool * * @throws Throwable */ + #[Override] public function loadUserByIdentifier(string $identifier): SecurityUser { $user = $this->userRepository->loadUserByIdentifier( @@ -60,6 +63,7 @@ public function loadUserByIdentifier(string $identifier): SecurityUser /** * @throws Throwable */ + #[Override] public function refreshUser(UserInterface $user): SecurityUser { if (!($user instanceof SecurityUser)) { diff --git a/src/Security/RolesService.php b/src/Security/RolesService.php index ab336e720..151553467 100644 --- a/src/Security/RolesService.php +++ b/src/Security/RolesService.php @@ -11,6 +11,7 @@ use App\Enum\Role; use App\Security\Interfaces\RolesServiceInterface; use BackedEnum; +use Override; use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; use function array_map; use function array_unique; @@ -28,11 +29,13 @@ public function __construct( ) { } + #[Override] public function getRoles(): array { return array_map(static fn (BackedEnum $enum): string => $enum->value, Role::cases()); } + #[Override] public function getRoleLabel(string $role): string { $enum = Role::tryFrom($role); @@ -42,6 +45,7 @@ public function getRoleLabel(string $role): string : 'Unknown - ' . $role; } + #[Override] public function getShort(string $role): string { $enum = Role::tryFrom($role); @@ -51,6 +55,7 @@ public function getShort(string $role): string : 'Unknown - ' . $role; } + #[Override] public function getInheritedRoles(array $roles): array { return array_values(array_unique($this->roleHierarchy->getReachableRoleNames($roles))); diff --git a/src/Security/SecurityUser.php b/src/Security/SecurityUser.php index fd60a38a4..0072029ec 100644 --- a/src/Security/SecurityUser.php +++ b/src/Security/SecurityUser.php @@ -11,6 +11,7 @@ use App\Entity\User; use App\Enum\Language; use App\Enum\Locale; +use Override; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\UserInterface; @@ -45,6 +46,7 @@ public function getUuid(): string return $this->getUserIdentifier(); } + #[Override] public function getRoles(): array { return $this->roles; @@ -53,6 +55,7 @@ public function getRoles(): array /** * @codeCoverageIgnore */ + #[Override] public function getPassword(): ?string { return $this->password; @@ -69,10 +72,12 @@ public function getSalt(): ?string /** * @codeCoverageIgnore */ + #[Override] public function eraseCredentials(): void { } + #[Override] public function getUserIdentifier(): string { return $this->identifier; diff --git a/src/Security/Voter/IsUserHimselfVoter.php b/src/Security/Voter/IsUserHimselfVoter.php index 6ab04dc40..b296515a2 100644 --- a/src/Security/Voter/IsUserHimselfVoter.php +++ b/src/Security/Voter/IsUserHimselfVoter.php @@ -10,6 +10,7 @@ use App\Entity\User; use App\Security\SecurityUser; +use Override; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\Voter; @@ -29,6 +30,7 @@ class IsUserHimselfVoter extends Voter /** * {@inheritdoc} */ + #[Override] protected function supports(string $attribute, mixed $subject): bool { return $attribute === self::ATTRIBUTE && $subject instanceof User; @@ -37,6 +39,7 @@ protected function supports(string $attribute, mixed $subject): bool /** * {@inheritdoc} */ + #[Override] protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool { $user = $token->getUser(); diff --git a/src/Utils/LoginLogger.php b/src/Utils/LoginLogger.php index 4c9984464..49119d982 100644 --- a/src/Utils/LoginLogger.php +++ b/src/Utils/LoginLogger.php @@ -15,6 +15,7 @@ use App\Utils\Interfaces\LoginLoggerInterface; use BadMethodCallException; use DeviceDetector\DeviceDetector; +use Override; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Throwable; @@ -35,6 +36,7 @@ public function __construct( $this->deviceDetector = new DeviceDetector(); } + #[Override] public function setUser(?User $user = null): self { $this->user = $user; @@ -42,6 +44,7 @@ public function setUser(?User $user = null): self return $this; } + #[Override] public function process(LogLoginEnum $type): void { // Get current request diff --git a/src/Utils/RequestLogger.php b/src/Utils/RequestLogger.php index 3805cf708..6dd5d826a 100644 --- a/src/Utils/RequestLogger.php +++ b/src/Utils/RequestLogger.php @@ -13,6 +13,7 @@ use App\Resource\LogRequestResource; use App\Resource\UserResource; use App\Utils\Interfaces\RequestLoggerInterface; +use Override; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\HttpFoundation\Request; @@ -46,6 +47,7 @@ public function __construct( ) { } + #[Override] public function setResponse(Response $response): self { $this->response = $response; @@ -53,6 +55,7 @@ public function setResponse(Response $response): self return $this; } + #[Override] public function setRequest(Request $request): self { $this->request = $request; @@ -60,6 +63,7 @@ public function setRequest(Request $request): self return $this; } + #[Override] public function setUserId(string $userId): self { $this->userId = $userId; @@ -67,6 +71,7 @@ public function setUserId(string $userId): self return $this; } + #[Override] public function setApiKeyId(string $apiKeyId): self { $this->apiKeyId = $apiKeyId; @@ -74,6 +79,7 @@ public function setApiKeyId(string $apiKeyId): self return $this; } + #[Override] public function setMainRequest(bool $mainRequest): self { $this->mainRequest = $mainRequest; @@ -81,6 +87,7 @@ public function setMainRequest(bool $mainRequest): self return $this; } + #[Override] public function handle(): void { // Just check that we have all that we need diff --git a/src/Validator/Constraints/EntityReferenceExistsValidator.php b/src/Validator/Constraints/EntityReferenceExistsValidator.php index c51373f96..6ade5239c 100644 --- a/src/Validator/Constraints/EntityReferenceExistsValidator.php +++ b/src/Validator/Constraints/EntityReferenceExistsValidator.php @@ -12,6 +12,7 @@ use App\Validator\Constraints\EntityReferenceExists as Constraint; use Closure; use Doctrine\ORM\EntityNotFoundException; +use Override; use Psr\Log\LoggerInterface; use Symfony\Component\Validator\Constraint as BaseConstraint; use Symfony\Component\Validator\ConstraintValidator; @@ -38,6 +39,7 @@ public function __construct( /** * {@inheritdoc} */ + #[Override] public function validate(mixed $value, BaseConstraint $constraint): void { if (!$constraint instanceof Constraint) { diff --git a/src/Validator/Constraints/LanguageValidator.php b/src/Validator/Constraints/LanguageValidator.php index 9ccf11267..636a58d40 100644 --- a/src/Validator/Constraints/LanguageValidator.php +++ b/src/Validator/Constraints/LanguageValidator.php @@ -9,6 +9,7 @@ namespace App\Validator\Constraints; use App\Service\Localization; +use Override; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use function in_array; @@ -27,6 +28,7 @@ public function __construct( /** * {@inheritdoc} */ + #[Override] public function validate(mixed $value, Constraint $constraint): void { if (in_array($value, $this->localization->getLanguages(), true) !== true) { diff --git a/src/Validator/Constraints/LocaleValidator.php b/src/Validator/Constraints/LocaleValidator.php index 8069035a9..0f2b0f830 100644 --- a/src/Validator/Constraints/LocaleValidator.php +++ b/src/Validator/Constraints/LocaleValidator.php @@ -9,6 +9,7 @@ namespace App\Validator\Constraints; use App\Service\Localization; +use Override; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use function in_array; @@ -27,6 +28,7 @@ public function __construct( /** * {@inheritdoc} */ + #[Override] public function validate(mixed $value, Constraint $constraint): void { if (in_array($value, $this->localization->getLocales(), true) !== true) { diff --git a/src/Validator/Constraints/TimezoneValidator.php b/src/Validator/Constraints/TimezoneValidator.php index e6d7f0da8..192c9cf40 100644 --- a/src/Validator/Constraints/TimezoneValidator.php +++ b/src/Validator/Constraints/TimezoneValidator.php @@ -9,6 +9,7 @@ namespace App\Validator\Constraints; use App\Service\Localization; +use Override; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use function array_column; @@ -29,6 +30,7 @@ public function __construct( /** * {@inheritdoc} */ + #[Override] public function validate(mixed $value, Constraint $constraint): void { if (is_string($value) diff --git a/src/Validator/Constraints/UniqueEmail.php b/src/Validator/Constraints/UniqueEmail.php index 91829309b..dec2ba89e 100644 --- a/src/Validator/Constraints/UniqueEmail.php +++ b/src/Validator/Constraints/UniqueEmail.php @@ -9,6 +9,7 @@ namespace App\Validator\Constraints; use Attribute; +use Override; use Symfony\Component\Validator\Constraint; /** @@ -38,6 +39,7 @@ class UniqueEmail extends Constraint self::IS_UNIQUE_EMAIL_ERROR => 'IS_UNIQUE_EMAIL_ERROR', ]; + #[Override] public function getTargets(): string { $output = null; diff --git a/src/Validator/Constraints/UniqueEmailValidator.php b/src/Validator/Constraints/UniqueEmailValidator.php index 1416c53d8..c9a2ec35d 100644 --- a/src/Validator/Constraints/UniqueEmailValidator.php +++ b/src/Validator/Constraints/UniqueEmailValidator.php @@ -11,6 +11,7 @@ use App\Entity\Interfaces\UserInterface; use App\Repository\UserRepository; use Doctrine\ORM\NonUniqueResultException; +use Override; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; @@ -30,6 +31,7 @@ public function __construct( * * @throws NonUniqueResultException */ + #[Override] public function validate(mixed $value, Constraint $constraint): void { if ($value instanceof UserInterface diff --git a/src/Validator/Constraints/UniqueUsername.php b/src/Validator/Constraints/UniqueUsername.php index 129e5740b..b0b1427e9 100644 --- a/src/Validator/Constraints/UniqueUsername.php +++ b/src/Validator/Constraints/UniqueUsername.php @@ -9,6 +9,7 @@ namespace App\Validator\Constraints; use Attribute; +use Override; use Symfony\Component\Validator\Constraint; /** @@ -38,6 +39,7 @@ class UniqueUsername extends Constraint self::IS_UNIQUE_USERNAME_ERROR => 'IS_UNIQUE_USERNAME_ERROR', ]; + #[Override] public function getTargets(): string { $output = null; diff --git a/src/Validator/Constraints/UniqueUsernameValidator.php b/src/Validator/Constraints/UniqueUsernameValidator.php index fd438a309..864f5e983 100644 --- a/src/Validator/Constraints/UniqueUsernameValidator.php +++ b/src/Validator/Constraints/UniqueUsernameValidator.php @@ -11,6 +11,7 @@ use App\Entity\Interfaces\UserInterface; use App\Repository\UserRepository; use Doctrine\ORM\NonUniqueResultException; +use Override; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; @@ -30,6 +31,7 @@ public function __construct( * * @throws NonUniqueResultException */ + #[Override] public function validate(mixed $value, Constraint $constraint): void { if ($value instanceof UserInterface diff --git a/src/ValueResolver/EntityValueResolver.php b/src/ValueResolver/EntityValueResolver.php index 923644a52..4e4a5a348 100644 --- a/src/ValueResolver/EntityValueResolver.php +++ b/src/ValueResolver/EntityValueResolver.php @@ -11,6 +11,7 @@ use App\Entity\Interfaces\EntityInterface; use App\Resource\ResourceCollection; use Generator; +use Override; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; @@ -77,6 +78,7 @@ public function supports(Request $request, ArgumentMetadata $argument): bool * * @return Generator */ + #[Override] public function resolve(Request $request, ArgumentMetadata $argument): Generator { if (!$this->supports($request, $argument)) { diff --git a/src/ValueResolver/LoggedInUserValueResolver.php b/src/ValueResolver/LoggedInUserValueResolver.php index 0bb131a39..98310de46 100644 --- a/src/ValueResolver/LoggedInUserValueResolver.php +++ b/src/ValueResolver/LoggedInUserValueResolver.php @@ -12,6 +12,7 @@ use App\Security\UserTypeIdentification; use Generator; use Lexik\Bundle\JWTAuthenticationBundle\Exception\MissingTokenException; +use Override; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; @@ -63,6 +64,7 @@ public function supports(ArgumentMetadata $argument): bool * * @return Generator */ + #[Override] public function resolve(Request $request, ArgumentMetadata $argument): Generator { if (!$this->supports($argument)) { diff --git a/src/ValueResolver/RestDtoValueResolver.php b/src/ValueResolver/RestDtoValueResolver.php index aa8b417e8..fb8763639 100644 --- a/src/ValueResolver/RestDtoValueResolver.php +++ b/src/ValueResolver/RestDtoValueResolver.php @@ -13,6 +13,7 @@ use App\Rest\ControllerCollection; use AutoMapperPlus\AutoMapperInterface; use Generator; +use Override; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; @@ -86,6 +87,7 @@ public function supports(Request $request, ArgumentMetadata $argument): bool * * @return Generator */ + #[Override] public function resolve(Request $request, ArgumentMetadata $argument): Generator { if (!$this->supports($request, $argument) || $this->controllerName === null) {