From 554bcc5cb3d21766847ed003178693bda99d29ef Mon Sep 17 00:00:00 2001 From: Daniel Subiabre Date: Mon, 28 Oct 2024 13:44:35 +0100 Subject: [PATCH] Code improvements --- src/ApiResource/AccountingApiResource.php | 2 +- src/EventListener/AccountingOwnerListener.php | 2 +- src/Library/Benzina/Pump/UsersPump.php | 1 - src/State/AccountingStateProcessor.php | 4 ++-- tests/Library/Economy/Payment/WalletGatewayServiceTest.php | 1 - 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ApiResource/AccountingApiResource.php b/src/ApiResource/AccountingApiResource.php index ade3b82..44d4f90 100644 --- a/src/ApiResource/AccountingApiResource.php +++ b/src/ApiResource/AccountingApiResource.php @@ -31,7 +31,7 @@ class AccountingApiResource { public function __construct( private readonly Accounting $accounting, - private readonly AccountingOwnerInterface $owner + private readonly AccountingOwnerInterface $owner, ) {} public function getId(): ?int diff --git a/src/EventListener/AccountingOwnerListener.php b/src/EventListener/AccountingOwnerListener.php index 8359fdd..91a58fb 100644 --- a/src/EventListener/AccountingOwnerListener.php +++ b/src/EventListener/AccountingOwnerListener.php @@ -22,7 +22,7 @@ final class AccountingOwnerListener * Generates a WalletStatement for User-received Transactions. */ public function postPersist( - PostPersistEventArgs $event + PostPersistEventArgs $event, ) { $entity = $event->getObject(); diff --git a/src/Library/Benzina/Pump/UsersPump.php b/src/Library/Benzina/Pump/UsersPump.php index 4764e66..ae5f8d7 100644 --- a/src/Library/Benzina/Pump/UsersPump.php +++ b/src/Library/Benzina/Pump/UsersPump.php @@ -2,7 +2,6 @@ namespace App\Library\Benzina\Pump; -use App\Entity\Accounting; use App\Entity\User; use App\Library\Benzina\Pump\Trait\ArrayPumpTrait; use App\Library\Benzina\Pump\Trait\DoctrinePumpTrait; diff --git a/src/State/AccountingStateProcessor.php b/src/State/AccountingStateProcessor.php index 6e7b278..0e4c8c4 100644 --- a/src/State/AccountingStateProcessor.php +++ b/src/State/AccountingStateProcessor.php @@ -15,11 +15,11 @@ class AccountingStateProcessor implements ProcessorInterface ) {} /** - * @param \App\ApiResource\AccountingApiResource $data + * @param AccountingApiResource $data */ public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []) { - /** @var \App\Entity\Accounting */ + /** @var Accounting */ $accounting = $this->entityManager->find(Accounting::class, $data->getId()); $accounting->setCurrency($data->getCurrency()); diff --git a/tests/Library/Economy/Payment/WalletGatewayServiceTest.php b/tests/Library/Economy/Payment/WalletGatewayServiceTest.php index b6db8da..06ddf37 100644 --- a/tests/Library/Economy/Payment/WalletGatewayServiceTest.php +++ b/tests/Library/Economy/Payment/WalletGatewayServiceTest.php @@ -2,7 +2,6 @@ namespace App\Tests\Library\Economy\Payment; -use App\Entity\Accounting; use App\Entity\AccountingTransaction; use App\Entity\Money; use App\Entity\Tipjar;