From 44be1e05fb0be1a2ccfcc37c4c9b9cc2ca832ca9 Mon Sep 17 00:00:00 2001 From: Daniel Subiabre Date: Wed, 15 Jan 2025 16:33:26 +0100 Subject: [PATCH] Remove unnecessary accounting resource owner setting --- src/State/Accounting/AccountingStateProvider.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/State/Accounting/AccountingStateProvider.php b/src/State/Accounting/AccountingStateProvider.php index 3ef5d91..4c4e25a 100644 --- a/src/State/Accounting/AccountingStateProvider.php +++ b/src/State/Accounting/AccountingStateProvider.php @@ -65,21 +65,6 @@ class AccountingStateProvider implements ProviderInterface $resource = $this->autoMapper->map($accounting, AccountingApiResource::class); $resource->balance = $this->accountingService->calcBalance($accounting); - $owner = $accounting->getOwner(); - - switch ($owner::class) { - case User::class: - $resourceClass = UserApiResource::class; - break; - case Project::class: - $resourceClass = ProjectApiResource::class; - break; - case Tipjar::class: - $resourceClass = Tipjar::class; - } - - $resource->owner = $this->autoMapper->map($owner, $resourceClass); - return $resource; } }