Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
38 | 1 | public function update(Setting $setting) |
|
39 | { |
||
40 | 1 | $response = $this->httpPUT('/settings', $setting->toArray()); |
|
41 | 1 | if (!$this->hydrator) { |
|
42 | return $response; |
||
43 | } |
||
44 | // Use any valid status code here |
||
45 | 1 | if ($response->getStatusCode() !== 200) { |
|
46 | $this->handleErrors($response); |
||
47 | } |
||
48 | |||
49 | 1 | return $this->hydrator->hydrate($response, Setting::class); |
|
50 | } |
||
51 | } |
||
52 |