Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| AnalyticsException | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| notFound | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| invalidFormat | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| layoutForbidden | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace ImovelZapAi\Analytics\Domain\Exceptions; |
| 6 | |
| 7 | use RuntimeException; |
| 8 | |
| 9 | class AnalyticsException extends RuntimeException |
| 10 | { |
| 11 | public static function notFound(string $entity = 'Registro analítico'): self |
| 12 | { |
| 13 | return new self("{$entity} não encontrado."); |
| 14 | } |
| 15 | |
| 16 | public static function invalidFormat(string $format): self |
| 17 | { |
| 18 | return new self("Formato de exportação inválido: {$format}."); |
| 19 | } |
| 20 | |
| 21 | public static function layoutForbidden(): self |
| 22 | { |
| 23 | return new self('Você não pode editar o layout deste usuário.'); |
| 24 | } |
| 25 | } |