Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
9 / 9
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
NullFinancialErpExporter
100.00% covered (success)
100.00%
9 / 9
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 exportDealStatement
100.00% covered (success)
100.00%
8 / 8
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace ImovelZapAi\Financial\Infrastructure\Erp;
6
7use ImovelZapAi\Financial\Application\Queries\GetDealFinancialStatementQuery;
8use ImovelZapAi\Financial\Domain\Ports\FinancialErpExporterInterface;
9
10final 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}