Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
SerializationException | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
20 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
setResponse | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getResponse | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Fingerprint\ServerAPI; |
4 | |
5 | use Psr\Http\Message\ResponseInterface; |
6 | |
7 | final class SerializationException extends \Exception |
8 | { |
9 | protected ?ResponseInterface $response; |
10 | |
11 | public function __construct(?ResponseInterface $response = null, ?\Exception $prev = null) |
12 | { |
13 | parent::__construct("Response from the server couldn't be serialized", $prev ? $prev->getCode() : 0, $prev); |
14 | $this->response = $response; |
15 | } |
16 | |
17 | public function setResponse(ResponseInterface $response): void |
18 | { |
19 | $this->response = $response; |
20 | } |
21 | |
22 | public function getResponse(): ?ResponseInterface |
23 | { |
24 | return $this->response; |
25 | } |
26 | } |