| Total Complexity | 6 |
| Total Lines | 65 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | abstract class AbstractByIdHeadRequest extends AbstractApiRequest |
||
| 18 | { |
||
| 19 | use ExpandTrait; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $id; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param JsonEndpoint $endpoint |
||
| 28 | * @param string $id |
||
| 29 | * @param Context $context |
||
| 30 | */ |
||
| 31 | public function __construct(JsonEndpoint $endpoint, $id, Context $context = null) |
||
| 32 | { |
||
| 33 | parent::__construct($endpoint, $context); |
||
| 34 | $this->setId($id); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getId() |
||
| 41 | { |
||
| 42 | return $this->id; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $id |
||
| 47 | * @return $this |
||
| 48 | */ |
||
| 49 | public function setId($id) |
||
| 50 | { |
||
| 51 | $this->id = $id; |
||
| 52 | |||
| 53 | return $this; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | * @internal |
||
| 59 | */ |
||
| 60 | protected function getPath() |
||
| 61 | { |
||
| 62 | return (string)$this->getEndpoint() . '/' . $this->getId() . $this->getParamString(); |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return HttpRequest |
||
| 67 | * @internal |
||
| 68 | */ |
||
| 69 | public function httpRequest() |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @param ResponseInterface $response |
||
| 76 | * @return ResourceResponse |
||
| 77 | * @internal |
||
| 78 | */ |
||
| 79 | public function buildResponse(ResponseInterface $response) |
||
| 82 | } |
||
| 83 | } |
||
| 84 |