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