| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 35 | public function create() |
||
| 36 | { |
||
| 37 | $path = $this->getCreatePath() ?? $this->getResourceName(); |
||
| 38 | |||
| 39 | $response = $this->postRequest($path); |
||
| 40 | $this->setAttributes([]); |
||
| 41 | $this->setValues($response); |
||
| 42 | if ($this->getClient()->getLastResponse()->getStatusCode() !== 201) { |
||
| 43 | throw new ResourceNotCreated($this->getClient()->getLastResponse()->getBody()); |
||
| 44 | } |
||
| 45 | |||
| 46 | return $this; |
||
| 47 | } |
||
| 71 |