Add missing return types

This will avoid deprecation messages
This commit is contained in:
Julien Fastré 2025-02-19 17:27:58 +01:00
parent cb068cdee7
commit 732b7dc8f7
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
8 changed files with 9 additions and 9 deletions

View File

@ -30,7 +30,7 @@ class ActivityValidity extends Constraint
public $socialIssuesMessage = 'For this type of activity, you must add at least one social issue'; public $socialIssuesMessage = 'For this type of activity, you must add at least one social issue';
public function getTargets() public function getTargets(): string
{ {
return self::CLASS_CONSTRAINT; return self::CLASS_CONSTRAINT;
} }

View File

@ -23,12 +23,12 @@ class Unaccent extends FunctionNode
{ {
private ?\Doctrine\ORM\Query\AST\Node $string = null; private ?\Doctrine\ORM\Query\AST\Node $string = null;
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string
{ {
return 'UNACCENT('.$this->string->dispatch($sqlWalker).')'; return 'UNACCENT('.$this->string->dispatch($sqlWalker).')';
} }
public function parse(\Doctrine\ORM\Query\Parser $parser) public function parse(\Doctrine\ORM\Query\Parser $parser): void
{ {
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);

View File

@ -25,7 +25,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
{ {
public function __construct(private readonly Security $security, private readonly TranslatorInterface $translator, private readonly \Twig\Environment $engine, private readonly NotificationPersisterInterface $notificationPersister) {} public function __construct(private readonly Security $security, private readonly TranslatorInterface $translator, private readonly \Twig\Environment $engine, private readonly NotificationPersisterInterface $notificationPersister) {}
public static function getSubscribedEvents() public static function getSubscribedEvents(): array
{ {
return [ return [
'workflow.accompanying_period_lifecycle.entered' => [ 'workflow.accompanying_period_lifecycle.entered' => [

View File

@ -147,7 +147,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
return []; return [];
} }
protected function supports($attribute, $subject) protected function supports($attribute, $subject): bool
{ {
return $this->voterHelper->supports($attribute, $subject); return $this->voterHelper->supports($attribute, $subject);
} }

View File

@ -18,7 +18,7 @@ class AccompanyingPeriodValidity extends Constraint
{ {
public $messageSocialIssueCannotBeDeleted = 'The social %name% issue cannot be deleted because it is associated with an activity or an action'; public $messageSocialIssueCannotBeDeleted = 'The social %name% issue cannot be deleted because it is associated with an activity or an action';
public function getTargets() public function getTargets(): string
{ {
return self::CLASS_CONSTRAINT; return self::CLASS_CONSTRAINT;
} }

View File

@ -18,7 +18,7 @@ class ConfidentialCourseMustHaveReferrer extends Constraint
{ {
public string $message = 'A confidential parcours must have a referrer'; public string $message = 'A confidential parcours must have a referrer';
public function getTargets() public function getTargets(): array
{ {
return [self::CLASS_CONSTRAINT]; return [self::CLASS_CONSTRAINT];
} }

View File

@ -20,7 +20,7 @@ class LocationValidity extends Constraint
public $messagePersonLocatedMustBeAssociated = "The person where the course is located must be associated to the course. Change course's location before removing the person."; public $messagePersonLocatedMustBeAssociated = "The person where the course is located must be associated to the course. Change course's location before removing the person.";
public function getTargets() public function getTargets(): string
{ {
return self::CLASS_CONSTRAINT; return self::CLASS_CONSTRAINT;
} }

View File

@ -20,7 +20,7 @@ class MaxHolder extends Constraint
public $messageInfinity = 'household.max_holder_overflowed_infinity'; public $messageInfinity = 'household.max_holder_overflowed_infinity';
public function getTargets() public function getTargets(): string
{ {
return self::CLASS_CONSTRAINT; return self::CLASS_CONSTRAINT;
} }