Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 6
CRAP
0.00% covered (danger)
0.00%
0 / 1
PlanLimitExceededException
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 6
42
0.00% covered (danger)
0.00%
0 / 1
 users
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 properties
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 subscriptionInactive
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 feature
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 whatsappMessages
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 trialExpired
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\Organizations\Domain\Exceptions;
6
7use RuntimeException;
8
9final class PlanLimitExceededException extends RuntimeException
10{
11    public static function users(int $limit): self
12    {
13        return new self("Limite do plano atingido: no máximo {$limit} usuário(s) nesta organização.");
14    }
15
16    public static function properties(int $limit): self
17    {
18        return new self("Limite do plano atingido: no máximo {$limit} imóvel(is) nesta organização.");
19    }
20
21    public static function subscriptionInactive(): self
22    {
23        return new self('A assinatura desta organização não está ativa. Atualize o plano para continuar.');
24    }
25
26    public static function feature(string $feature): self
27    {
28        return new self("Este recurso [{$feature}] não está incluído no plano atual. Faça upgrade para continuar.");
29    }
30
31    public static function whatsappMessages(int $limit): self
32    {
33        return new self("Limite do plano atingido: no máximo {$limit} mensagens WhatsApp neste mês. Faça upgrade para continuar.");
34    }
35
36    public static function trialExpired(): self
37    {
38        return new self('O período de teste terminou. Assine um plano em Configurações → Plano para continuar.');
39    }
40}