From d82f244ddbe7b753a376e1dfe6b5a411b014b014 Mon Sep 17 00:00:00 2001 From: Daniel Subiabre Date: Mon, 16 Dec 2024 13:33:11 +0100 Subject: [PATCH] Fixes by PHP CS Fixer --- src/Mapping/AutoMapper.php | 2 +- src/Mapping/Provider/EntityMapProvider.php | 2 +- src/Service/Auth/AuthService.php | 2 +- src/Service/Project/RewardService.php | 8 +++----- src/State/Project/RewardStateProcessor.php | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Mapping/AutoMapper.php b/src/Mapping/AutoMapper.php index 94053ca..6cbf5cf 100644 --- a/src/Mapping/AutoMapper.php +++ b/src/Mapping/AutoMapper.php @@ -23,7 +23,7 @@ public function map(array|object $source, string|array|object $target, array $co { $context = [ self::SKIP_NULL_VALUES => true, - ...$context + ...$context, ]; return $this->innerMapper->map($source, $target, $context); diff --git a/src/Mapping/Provider/EntityMapProvider.php b/src/Mapping/Provider/EntityMapProvider.php index 345b0a5..c41065f 100644 --- a/src/Mapping/Provider/EntityMapProvider.php +++ b/src/Mapping/Provider/EntityMapProvider.php @@ -8,7 +8,7 @@ class EntityMapProvider implements ProviderInterface { public function __construct( - private EntityManagerInterface $entityManager + private EntityManagerInterface $entityManager, ) {} public function provide(string $targetType, mixed $source, array $context): object|array|null diff --git a/src/Service/Auth/AuthService.php b/src/Service/Auth/AuthService.php index a000915..8d507ee 100644 --- a/src/Service/Auth/AuthService.php +++ b/src/Service/Auth/AuthService.php @@ -16,7 +16,7 @@ class AuthService public function __construct( private string $appSecret, private Security $security, - private UserRepository $userRepository + private UserRepository $userRepository, ) {} /** diff --git a/src/Service/Project/RewardService.php b/src/Service/Project/RewardService.php index 1db9240..131c1c7 100644 --- a/src/Service/Project/RewardService.php +++ b/src/Service/Project/RewardService.php @@ -8,10 +8,8 @@ class RewardService { /** - * Processes a RewardClaim for the set Reward - * - * @param Reward $reward The Reward being claimed - * + * Processes a RewardClaim for the set Reward. + * * @return RewardClaim The processed RewardClaim with updated Reward */ public function processClaim(RewardClaim $claim): RewardClaim @@ -25,7 +23,7 @@ public function processClaim(RewardClaim $claim): RewardClaim $available = $reward->getUnitsAvailable(); if ($available < 1) { - throw new \Exception("The claimed Reward has no units available"); + throw new \Exception('The claimed Reward has no units available'); } $reward->addClaim($claim); diff --git a/src/State/Project/RewardStateProcessor.php b/src/State/Project/RewardStateProcessor.php index 6168a15..77d978f 100644 --- a/src/State/Project/RewardStateProcessor.php +++ b/src/State/Project/RewardStateProcessor.php @@ -18,7 +18,7 @@ public function __construct( /** * @param RewardApiResource $data - * + * * @return RewardApiResource|null */ public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = [])