Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
NotAcceptedException | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getStatusCode | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | namespace Apie\Serializer\Exceptions; |
3 | |
4 | use Apie\Core\Exceptions\ApieException; |
5 | use Apie\Core\Exceptions\HttpStatusCodeException; |
6 | |
7 | class NotAcceptedException extends ApieException implements HttpStatusCodeException |
8 | { |
9 | public function __construct(string $acceptHeader) |
10 | { |
11 | parent::__construct(sprintf('Accept header: "%s" not accepted!', $acceptHeader)); |
12 | } |
13 | |
14 | public function getStatusCode(): int |
15 | { |
16 | return 406; |
17 | } |
18 | } |