Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
9 / 9 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| NullFinancialErpExporter | |
100.00% |
9 / 9 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| exportDealStatement | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace ImovelZapAi\Financial\Infrastructure\Erp; |
| 6 | |
| 7 | use ImovelZapAi\Financial\Application\Queries\GetDealFinancialStatementQuery; |
| 8 | use ImovelZapAi\Financial\Domain\Ports\FinancialErpExporterInterface; |
| 9 | |
| 10 | final class NullFinancialErpExporter implements FinancialErpExporterInterface |
| 11 | { |
| 12 | public function __construct( |
| 13 | private readonly GetDealFinancialStatementQuery $statement, |
| 14 | ) {} |
| 15 | |
| 16 | public function exportDealStatement(string $tenantId, string $dealId): array |
| 17 | { |
| 18 | $statement = $this->statement->execute($tenantId, $dealId); |
| 19 | |
| 20 | return [ |
| 21 | 'provider' => null, |
| 22 | 'exported' => false, |
| 23 | 'deal_id' => $dealId, |
| 24 | 'summary' => $statement['summary'], |
| 25 | 'payload' => [], |
| 26 | ]; |
| 27 | } |
| 28 | } |