Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
SeedFinancialOnSignatureCompleted
100.00% covered (success)
100.00%
2 / 2
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
 handle
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace ImovelZapAi\Financial\Infrastructure\Listeners;
6
7use ImovelZapAi\Financial\Application\Actions\SeedFinancialFromSignatureAction;
8use ImovelZapAi\Signatures\Domain\Events\SignatureCompleted;
9
10final class SeedFinancialOnSignatureCompleted
11{
12    public function __construct(
13        private readonly SeedFinancialFromSignatureAction $seed,
14    ) {}
15
16    public function handle(SignatureCompleted $event): void
17    {
18        $this->seed->execute($event->tenantId, $event->signatureRequestId);
19    }
20}