Total Complexity | 1 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
26 | abstract class AbstractRequest extends BaseRequest implements RequestInterface { |
||
27 | |||
28 | /** |
||
29 | * Constructor. |
||
30 | */ |
||
31 | public function __construct() { |
||
32 | // NOTHING TO DO |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Deserialize a response. |
||
37 | * |
||
38 | * @param string $rawResponse The raw response. |
||
39 | * @return AbstractResponse Returns the deserialized response. |
||
40 | */ |
||
41 | abstract public function deserializeResponse(string $rawResponse): AbstractResponse; |
||
42 | |||
43 | /** |
||
44 | * Serialize this request. |
||
45 | * |
||
46 | * @return array<string,mixed> Returns this serialized request. |
||
47 | * @throws InvalidArgumentException Throws an invalid argument exception if a mandatory parameter is missing. |
||
48 | */ |
||
49 | abstract public function serializeRequest(): array; |
||
50 | } |
||
51 |