diff --git a/src/ApiResource/Accounting/AccountingSeriesApiResource.php b/src/ApiResource/Accounting/AccountingSeriesApiResource.php deleted file mode 100644 index c56693d..0000000 --- a/src/ApiResource/Accounting/AccountingSeriesApiResource.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ - public array $data; -} diff --git a/src/Dto/AccountingSeriesDto.php b/src/Dto/AccountingSeriesDto.php deleted file mode 100644 index 94e8087..0000000 --- a/src/Dto/AccountingSeriesDto.php +++ /dev/null @@ -1,41 +0,0 @@ -end ??= new \DateTimeImmutable('now'); - } -} diff --git a/src/State/Accounting/AccountingBalancePointStateProvider.php b/src/State/Accounting/AccountingBalancePointStateProvider.php index b719635..853eecb 100644 --- a/src/State/Accounting/AccountingBalancePointStateProvider.php +++ b/src/State/Accounting/AccountingBalancePointStateProvider.php @@ -25,9 +25,7 @@ class AccountingBalancePointStateProvider implements ProviderInterface $accounting = $this->getAccounting($parameters); $period = $this->buildPeriod($parameters); - $points = $this->accountingService->calcBalancePoints($accounting, $period); - - dd($points); + return $this->accountingService->calcBalancePoints($accounting, $period); } private function getAccounting(Parameters $parameters): Accounting diff --git a/src/State/Accounting/AccountingSeriesStateProcessor.php b/src/State/Accounting/AccountingSeriesStateProcessor.php deleted file mode 100644 index cbd4ad1..0000000 --- a/src/State/Accounting/AccountingSeriesStateProcessor.php +++ /dev/null @@ -1,48 +0,0 @@ -autoMapper->map($data->accounting, Accounting::class); - - $points = $this->accountingService->calcBalanceSeries( - $accounting, - new \DatePeriod( - $data->start, - new \DateInterval(\sprintf('PT%s', $data->interval)), - $data->end, - \DatePeriod::INCLUDE_END_DATE - ) - ); - - /** @var AccountingSeriesApiResource */ - $series = $this->autoMapper->map($data, AccountingSeriesApiResource::class); - - $series->data = $points; - $series->length = \count($points); - - return $series; - } -}