| Total Complexity | 12 |
| Total Lines | 78 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 7 | class ClientRequest implements HttpClientRequest |
||
| 8 | { |
||
| 9 | protected string $method; |
||
| 10 | protected string $uri; |
||
| 11 | protected array $json; |
||
| 12 | protected array $query; |
||
| 13 | protected array $headers; |
||
| 14 | protected bool $ssl; |
||
| 15 | protected array $options; |
||
| 16 | |||
| 17 | public function getMethod(): string |
||
| 18 | { |
||
| 19 | return $this->method ?? ''; |
||
| 20 | } |
||
| 21 | |||
| 22 | public function getUri(): string |
||
| 23 | { |
||
| 24 | return $this->uri ?? ''; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function getJson(): array |
||
| 28 | { |
||
| 29 | return $this->json ?? []; |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getQuery(): array |
||
| 33 | { |
||
| 34 | return $this->query ?? []; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getHeader(string $key) |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getHeaders(): array |
||
| 43 | { |
||
| 44 | return $this->headers; |
||
| 45 | } |
||
| 46 | |||
| 47 | public function setMethod(string $method): HttpClientRequest |
||
| 48 | { |
||
| 49 | $this->method = $method; |
||
| 50 | |||
| 51 | return $this; |
||
| 52 | } |
||
| 53 | |||
| 54 | public function setUri(string $uri): HttpClientRequest |
||
| 59 | } |
||
| 60 | |||
| 61 | public function setHeader(string $key, string $value): HttpClientRequest |
||
| 62 | { |
||
| 63 | $this->headers[$key] = $value; |
||
| 64 | |||
| 65 | return $this; |
||
| 66 | } |
||
| 67 | |||
| 68 | public function setJson(array $json): HttpClientRequest |
||
| 69 | { |
||
| 70 | $this->json = $json; |
||
| 71 | |||
| 72 | return $this; |
||
| 73 | } |
||
| 74 | |||
| 75 | public function setQuery(array $query): HttpClientRequest |
||
| 80 | } |
||
| 81 | |||
| 82 | public function ssl(bool $ssl): void |
||
| 87 |