Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
AnalyticsException
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 3
12
0.00% covered (danger)
0.00%
0 / 1
 notFound
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 invalidFormat
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 layoutForbidden
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3declare(strict_types=1);
4
5namespace ImovelZapAi\Analytics\Domain\Exceptions;
6
7use RuntimeException;
8
9class 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}