diff --git a/api/src/State/ActivityCreateProcessor.php b/api/src/State/ActivityCreateProcessor.php index 873458942f..5a3d2bc4d1 100644 --- a/api/src/State/ActivityCreateProcessor.php +++ b/api/src/State/ActivityCreateProcessor.php @@ -11,6 +11,9 @@ use App\Util\EntityMap; use Doctrine\ORM\EntityManagerInterface; +/** + * @template-extends AbstractPersistProcessor + */ class ActivityCreateProcessor extends AbstractPersistProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/ActivityRemoveProcessor.php b/api/src/State/ActivityRemoveProcessor.php index 59e5231076..652727b048 100644 --- a/api/src/State/ActivityRemoveProcessor.php +++ b/api/src/State/ActivityRemoveProcessor.php @@ -8,6 +8,9 @@ use App\State\Util\AbstractRemoveProcessor; use Doctrine\ORM\EntityManagerInterface; +/** + * @template-extends AbstractRemoveProcessor + */ class ActivityRemoveProcessor extends AbstractRemoveProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/CampCollaborationCreateProcessor.php b/api/src/State/CampCollaborationCreateProcessor.php index d5e2cf200f..2f36ca4784 100644 --- a/api/src/State/CampCollaborationCreateProcessor.php +++ b/api/src/State/CampCollaborationCreateProcessor.php @@ -15,6 +15,9 @@ use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; use Symfony\Component\Security\Core\Security; +/** + * @template-extends AbstractPersistProcessor + */ class CampCollaborationCreateProcessor extends AbstractPersistProcessor { use CampCollaborationSendEmailTrait; diff --git a/api/src/State/CampCollaborationResendInvitationProcessor.php b/api/src/State/CampCollaborationResendInvitationProcessor.php index 6d6c969283..b07db4773a 100644 --- a/api/src/State/CampCollaborationResendInvitationProcessor.php +++ b/api/src/State/CampCollaborationResendInvitationProcessor.php @@ -11,6 +11,9 @@ use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; use Symfony\Component\Security\Core\Security; +/** + * @template-extends AbstractPersistProcessor + */ class CampCollaborationResendInvitationProcessor extends AbstractPersistProcessor { use CampCollaborationSendEmailTrait; diff --git a/api/src/State/CampCollaborationUpdateProcessor.php b/api/src/State/CampCollaborationUpdateProcessor.php index eb99cec415..7794030630 100644 --- a/api/src/State/CampCollaborationUpdateProcessor.php +++ b/api/src/State/CampCollaborationUpdateProcessor.php @@ -11,6 +11,9 @@ use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; use Symfony\Component\Security\Core\Security; +/** + * @template-extends AbstractPersistProcessor + */ class CampCollaborationUpdateProcessor extends AbstractPersistProcessor { use CampCollaborationSendEmailTrait; diff --git a/api/src/State/CampCreateProcessor.php b/api/src/State/CampCreateProcessor.php index c26dc24bd1..2476a8875e 100644 --- a/api/src/State/CampCreateProcessor.php +++ b/api/src/State/CampCreateProcessor.php @@ -15,6 +15,9 @@ use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Security\Core\Security; +/** + * @template-extends AbstractPersistProcessor + */ class CampCreateProcessor extends AbstractPersistProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/CampRemoveProcessor.php b/api/src/State/CampRemoveProcessor.php index f527f6ef7e..18456b8fdb 100644 --- a/api/src/State/CampRemoveProcessor.php +++ b/api/src/State/CampRemoveProcessor.php @@ -8,6 +8,9 @@ use App\State\Util\AbstractRemoveProcessor; use Doctrine\ORM\EntityManagerInterface; +/** + * @template-extends AbstractRemoveProcessor + */ class CampRemoveProcessor extends AbstractRemoveProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/CategoryCreateProcessor.php b/api/src/State/CategoryCreateProcessor.php index b7ff4cc41f..83162985a4 100644 --- a/api/src/State/CategoryCreateProcessor.php +++ b/api/src/State/CategoryCreateProcessor.php @@ -10,6 +10,9 @@ use App\State\Util\AbstractPersistProcessor; use Doctrine\ORM\EntityManagerInterface; +/** + * @template-extends AbstractPersistProcessor + */ class CategoryCreateProcessor extends AbstractPersistProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/CategoryRemoveProcessor.php b/api/src/State/CategoryRemoveProcessor.php index 47b884f9b9..49fc4d26f7 100644 --- a/api/src/State/CategoryRemoveProcessor.php +++ b/api/src/State/CategoryRemoveProcessor.php @@ -8,6 +8,9 @@ use App\State\Util\AbstractRemoveProcessor; use Doctrine\ORM\EntityManagerInterface; +/** + * @template-extends AbstractRemoveProcessor + */ class CategoryRemoveProcessor extends AbstractRemoveProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/ContentNode/ContentNodePersistProcessor.php b/api/src/State/ContentNode/ContentNodePersistProcessor.php index 7eaaee1d5d..63038181f2 100644 --- a/api/src/State/ContentNode/ContentNodePersistProcessor.php +++ b/api/src/State/ContentNode/ContentNodePersistProcessor.php @@ -7,13 +7,14 @@ use App\Entity\ContentNode; use App\State\Util\AbstractPersistProcessor; +/** + * @template T of ContentNode + * + * @template-extends AbstractPersistProcessor + */ class ContentNodePersistProcessor extends AbstractPersistProcessor { /** - * @template T of ContentNode - * * @param T $data - * - * @return T */ public function onBefore($data, Operation $operation, array $uriVariables = [], array $context = []): ContentNode { $data = parent::onBefore($data, $operation, $uriVariables, $context); diff --git a/api/src/State/ContentNode/MultiSelectCreateProcessor.php b/api/src/State/ContentNode/MultiSelectCreateProcessor.php index 7d46bbfda5..4fde653b32 100644 --- a/api/src/State/ContentNode/MultiSelectCreateProcessor.php +++ b/api/src/State/ContentNode/MultiSelectCreateProcessor.php @@ -5,6 +5,9 @@ use ApiPlatform\Metadata\Operation; use App\Entity\ContentNode\MultiSelect; +/** + * @template-extends ContentNodePersistProcessor + */ class MultiSelectCreateProcessor extends ContentNodePersistProcessor { /** * @param MultiSelect $data diff --git a/api/src/State/ContentNode/SingleTextPersistProcessor.php b/api/src/State/ContentNode/SingleTextPersistProcessor.php index fab5909b34..48327d2821 100644 --- a/api/src/State/ContentNode/SingleTextPersistProcessor.php +++ b/api/src/State/ContentNode/SingleTextPersistProcessor.php @@ -7,6 +7,9 @@ use App\Entity\ContentNode\SingleText; use App\InputFilter\CleanHTMLFilter; +/** + * @template-extends ContentNodePersistProcessor + */ class SingleTextPersistProcessor extends ContentNodePersistProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/ContentNode/StoryboardPersistProcessor.php b/api/src/State/ContentNode/StoryboardPersistProcessor.php index 9a7ebfa9fd..23079f61f6 100644 --- a/api/src/State/ContentNode/StoryboardPersistProcessor.php +++ b/api/src/State/ContentNode/StoryboardPersistProcessor.php @@ -10,6 +10,9 @@ use App\InputFilter\CleanTextFilter; use Ramsey\Uuid\Uuid; +/** + * @template-extends ContentNodePersistProcessor + */ class StoryboardPersistProcessor extends ContentNodePersistProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/InvitationAcceptProcessor.php b/api/src/State/InvitationAcceptProcessor.php index a554586490..a0c5983edb 100644 --- a/api/src/State/InvitationAcceptProcessor.php +++ b/api/src/State/InvitationAcceptProcessor.php @@ -11,6 +11,9 @@ use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; use Symfony\Component\Security\Core\Security; +/** + * @implements ProcessorInterface + */ class InvitationAcceptProcessor implements ProcessorInterface { public function __construct( private PasswordHasherFactoryInterface $passwordHasherFactory, diff --git a/api/src/State/InvitationRejectProcessor.php b/api/src/State/InvitationRejectProcessor.php index d72d53372a..812a165589 100644 --- a/api/src/State/InvitationRejectProcessor.php +++ b/api/src/State/InvitationRejectProcessor.php @@ -10,6 +10,9 @@ use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; +/** + * @implements ProcessorInterface + */ class InvitationRejectProcessor implements ProcessorInterface { public function __construct( private PasswordHasherFactoryInterface $passwordHasherFactory, diff --git a/api/src/State/PeriodPersistProcessor.php b/api/src/State/PeriodPersistProcessor.php index 5e8986d7bf..d0b6c50370 100644 --- a/api/src/State/PeriodPersistProcessor.php +++ b/api/src/State/PeriodPersistProcessor.php @@ -9,6 +9,9 @@ use App\State\Util\AbstractPersistProcessor; use App\Util\DateTimeUtil; +/** + * @template-extends AbstractPersistProcessor + */ class PeriodPersistProcessor extends AbstractPersistProcessor { public function __construct( ProcessorInterface $decorated diff --git a/api/src/State/ProfileUpdateProcessor.php b/api/src/State/ProfileUpdateProcessor.php index e18ed1ef1b..cc9f188a96 100644 --- a/api/src/State/ProfileUpdateProcessor.php +++ b/api/src/State/ProfileUpdateProcessor.php @@ -12,6 +12,9 @@ use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; use Symfony\Component\PasswordHasher\PasswordHasherInterface; +/** + * @template-extends AbstractPersistProcessor + */ class ProfileUpdateProcessor extends AbstractPersistProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/ResetPasswordCreateProcessor.php b/api/src/State/ResetPasswordCreateProcessor.php index 3f64851070..b89190f1e0 100644 --- a/api/src/State/ResetPasswordCreateProcessor.php +++ b/api/src/State/ResetPasswordCreateProcessor.php @@ -14,6 +14,9 @@ use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; use Symfony\Component\PasswordHasher\PasswordHasherInterface; +/** + * @implements ProcessorInterface + */ class ResetPasswordCreateProcessor implements ProcessorInterface { public function __construct( private ReCaptcha $reCaptcha, diff --git a/api/src/State/ResetPasswordUpdateProcessor.php b/api/src/State/ResetPasswordUpdateProcessor.php index 9ea9a0058e..a11014bd4a 100644 --- a/api/src/State/ResetPasswordUpdateProcessor.php +++ b/api/src/State/ResetPasswordUpdateProcessor.php @@ -12,6 +12,9 @@ use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; use Symfony\Component\PasswordHasher\PasswordHasherInterface; +/** + * @implements ProcessorInterface + */ class ResetPasswordUpdateProcessor implements ProcessorInterface { public function __construct( private ReCaptcha $reCaptcha, diff --git a/api/src/State/UserActivateProcessor.php b/api/src/State/UserActivateProcessor.php index f05b3d09db..0ebe0d89c3 100644 --- a/api/src/State/UserActivateProcessor.php +++ b/api/src/State/UserActivateProcessor.php @@ -8,6 +8,9 @@ use App\State\Util\AbstractPersistProcessor; use Symfony\Component\HttpKernel\Exception\HttpException; +/** + * @template-extends AbstractPersistProcessor + */ class UserActivateProcessor extends AbstractPersistProcessor { public function __construct( ProcessorInterface $decorated diff --git a/api/src/State/UserCreateProcessor.php b/api/src/State/UserCreateProcessor.php index 3da019d735..4f10769bf7 100644 --- a/api/src/State/UserCreateProcessor.php +++ b/api/src/State/UserCreateProcessor.php @@ -12,6 +12,9 @@ use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; +/** + * @template-extends AbstractPersistProcessor + */ class UserCreateProcessor extends AbstractPersistProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/UserUpdateProcessor.php b/api/src/State/UserUpdateProcessor.php index 22d357dbcf..41361c6b62 100644 --- a/api/src/State/UserUpdateProcessor.php +++ b/api/src/State/UserUpdateProcessor.php @@ -8,6 +8,9 @@ use App\State\Util\AbstractPersistProcessor; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; +/** + * @template-extends AbstractPersistProcessor + */ class UserUpdateProcessor extends AbstractPersistProcessor { public function __construct( ProcessorInterface $decorated, diff --git a/api/src/State/Util/AbstractPersistProcessor.php b/api/src/State/Util/AbstractPersistProcessor.php index a6e74ed5b9..76aefbb3f3 100644 --- a/api/src/State/Util/AbstractPersistProcessor.php +++ b/api/src/State/Util/AbstractPersistProcessor.php @@ -6,6 +6,11 @@ use ApiPlatform\State\ProcessorInterface; use App\Entity\BaseEntity; +/** + * @template T + * + * @template-implements ProcessorInterface + */ abstract class AbstractPersistProcessor implements ProcessorInterface { /** * @param PropertyChangeListener[] $propertyChangeListeners @@ -22,8 +27,6 @@ public function __construct( } /** - * @template T - * * @param T $data * * @return T @@ -62,8 +65,6 @@ public function process(mixed $data, Operation $operation, array $uriVariables = /** * Return an object of the type and with the properties you want persisted. * - * @template T of BaseEntity - * * @param T $data * * @return T diff --git a/api/src/State/Util/AbstractRemoveProcessor.php b/api/src/State/Util/AbstractRemoveProcessor.php index fbf61051ff..9d6c6d28d2 100644 --- a/api/src/State/Util/AbstractRemoveProcessor.php +++ b/api/src/State/Util/AbstractRemoveProcessor.php @@ -5,6 +5,11 @@ use ApiPlatform\Metadata\Operation; use ApiPlatform\State\ProcessorInterface; +/** + * @template T + * + * @template-implements ProcessorInterface + */ abstract class AbstractRemoveProcessor implements ProcessorInterface { public function __construct( private ProcessorInterface $decorated,