| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | 1 | public function put($id, $name = null, $body = null, $guestSpaceId = null): array |
|
| 35 | { |
||
| 36 | 1 | $options = ['json' => ['id' => $id]]; |
|
| 37 | 1 | if ($name !== null) { |
|
| 38 | 1 | $options['json']['name'] = $name; |
|
| 39 | } |
||
| 40 | 1 | if ($body !== null) { |
|
| 41 | 1 | $options['json']['body'] = $body; |
|
| 42 | } |
||
| 43 | |||
| 44 | /** @var JsonStream $stream */ |
||
| 45 | 1 | $stream = $this->client |
|
| 46 | 1 | ->put(KintoneApi::generateUrl('space/thread.json', $guestSpaceId), $options) |
|
| 47 | 1 | ->getBody(); |
|
| 48 | |||
| 49 | 1 | return $stream->jsonSerialize(); |
|
| 50 | } |
||
| 84 |