| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | abstract class AbstractHeadRequest extends AbstractApiRequest |
||
| 18 | { |
||
| 19 | use QueryTrait; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param JsonEndpoint $endpoint |
||
| 23 | * @param Context $context |
||
| 24 | */ |
||
| 25 | public function __construct(JsonEndpoint $endpoint, Context $context = null) |
||
| 26 | { |
||
| 27 | parent::__construct($endpoint, $context); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return string |
||
| 32 | * @internal |
||
| 33 | */ |
||
| 34 | protected function getPath() |
||
| 35 | { |
||
| 36 | return (string)$this->getEndpoint() . $this->getParamString(); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return HttpRequest |
||
| 41 | * @internal |
||
| 42 | */ |
||
| 43 | public function httpRequest() |
||
| 44 | { |
||
| 45 | return new HttpRequest(HttpMethod::HEAD, $this->getPath()); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param ResponseInterface $response |
||
| 50 | * @return ResourceResponse |
||
| 51 | * @internal |
||
| 52 | */ |
||
| 53 | public function buildResponse(ResponseInterface $response) |
||
| 56 | } |
||
| 57 | } |
||
| 58 |