| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class VerifyAuthenticationException extends RuntimeException |
||
| 12 | { |
||
| 13 | /** @var string */ |
||
| 14 | private $errorCode; |
||
| 15 | /** @var string */ |
||
| 16 | private $publicMessage; |
||
| 17 | |||
| 18 | 27 | public function __construct( |
|
| 28 | } |
||
| 29 | |||
| 30 | 15 | public static function withError(string $errorCode, string $publicMessage, ?Throwable $prev = null): self |
|
| 31 | { |
||
| 32 | 15 | return new self( |
|
| 33 | 15 | $errorCode, |
|
| 34 | 15 | $publicMessage, |
|
| 35 | 15 | sprintf('Authentication verification failed with the public message "%s"', $publicMessage), |
|
| 36 | 15 | 0, |
|
| 37 | 15 | $prev |
|
| 38 | ); |
||
| 39 | } |
||
| 40 | |||
| 41 | 23 | public function getErrorCode(): string |
|
| 44 | } |
||
| 45 | |||
| 46 | 23 | public function getPublicMessage(): string |
|
| 49 | } |
||
| 50 | } |
||
| 51 |