| Total Complexity | 12 |
| Total Lines | 78 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 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 setMethod(string $method): HttpClientRequest |
||
| 43 | { |
||
| 44 | $this->method = $method; |
||
| 45 | |||
| 46 | return $this; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function setUri(string $uri): HttpClientRequest |
||
| 54 | } |
||
| 55 | |||
| 56 | public function setHeader(string $key, string $value): HttpClientRequest |
||
| 57 | { |
||
| 58 | $this->headers[$key] = $value; |
||
| 59 | |||
| 60 | return $this; |
||
| 61 | } |
||
| 62 | |||
| 63 | public function setJson(array $json): HttpClientRequest |
||
| 64 | { |
||
| 65 | $this->json = $json; |
||
| 66 | |||
| 67 | return $this; |
||
| 68 | } |
||
| 69 | |||
| 70 | public function setQuery(array $query): HttpClientRequest |
||
| 71 | { |
||
| 72 | $this->query = $query; |
||
| 73 | |||
| 74 | return $this; |
||
| 75 | } |
||
| 76 | |||
| 77 | public function ssl(bool $ssl): void |
||
| 78 | { |
||
| 79 | $this->ssl = $ssl; |
||
| 80 | } |
||
| 81 | |||
| 82 | public function options() |
||
| 85 | } |
||
| 86 | } |