Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
StubOmieExporter
100.00% covered (success)
100.00%
14 / 14
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%
13 / 13
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 StubOmieExporter 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' => 'omie',
22            'exported' => false,
23            'deal_id' => $dealId,
24            'summary' => $statement['summary'],
25            'payload' => [
26                'omie' => [
27                    'status' => 'stub',
28                    'message' => 'Integração Omie não configurada neste ambiente.',
29                ],
30            ],
31        ];
32    }
33}