| Total Complexity | 5 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class Collections extends ApiService { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param int $id |
||
| 18 | * @return Collection|null |
||
| 19 | * @throws ApiException |
||
| 20 | * @throws OAuthException |
||
| 21 | */ |
||
| 22 | public function fetch(int $id): ?Collection |
||
| 23 | { |
||
| 24 | /** @var Collection|null $fetch */ |
||
| 25 | $fetch = $this->_get('api/collections/collection' . $id); |
||
| 26 | return $fetch; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param array $data |
||
| 31 | * @return Collection|null |
||
| 32 | * @throws ApiException |
||
| 33 | * @throws OAuthException |
||
| 34 | */ |
||
| 35 | public function create(array $data): ?Collection |
||
| 36 | { |
||
| 37 | /** @var Collection|null $create */ |
||
| 38 | $create = $this->_post('api/collections/collection', $data); |
||
| 39 | return $create; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param int $id |
||
| 44 | * @param array $data |
||
| 45 | * @return Collection|null |
||
| 46 | * @throws ApiException |
||
| 47 | * @throws OAuthException |
||
| 48 | */ |
||
| 49 | public function update(int $id, array $data): ?Collection |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param int $id |
||
| 58 | * @return bool |
||
| 59 | * @throws ApiException |
||
| 60 | * @throws OAuthException |
||
| 61 | */ |
||
| 62 | public function delete(int $id): bool |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return ListResource |
||
| 69 | */ |
||
| 70 | public function all(): ListResource { |
||
| 72 | } |
||
| 73 | } |
||
| 74 |