Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| InvalidCsrfTokenException | |
100.00% |
4 / 4 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| getStatusCode | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\Exceptions; |
| 3 | |
| 4 | /** |
| 5 | * Exception thrown when an invalid CSRF token was provided in a form submit. |
| 6 | */ |
| 7 | final class InvalidCsrfTokenException extends ApieException implements HttpStatusCodeException |
| 8 | { |
| 9 | public function __construct() |
| 10 | { |
| 11 | parent::__construct( |
| 12 | sprintf('Invalid CSRF token or expired') |
| 13 | ); |
| 14 | } |
| 15 | |
| 16 | public function getStatusCode(): int |
| 17 | { |
| 18 | return 419; |
| 19 | } |
| 20 | } |