| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 2 | public function post($appId, $record, $comment, array $mentions = [], $guestSpaceId = null): array |
|
| 36 | { |
||
| 37 | 2 | $options = ['json' => [ |
|
| 38 | 2 | 'app' => $appId, |
|
| 39 | 2 | 'record' => $record, |
|
| 40 | 2 | 'comment' => [ |
|
| 41 | 2 | 'text' => $comment, |
|
| 42 | 2 | 'mentions' => $mentions |
|
| 43 | 2 | ] |
|
| 44 | 2 | ]]; |
|
| 45 | |||
| 46 | /** @var JsonStream $stream */ |
||
| 47 | 2 | $stream = $this->client |
|
| 48 | 2 | ->post(KintoneApi::generateUrl('record/comment.json', $guestSpaceId), $options) |
|
| 49 | 2 | ->getBody(); |
|
| 50 | |||
| 51 | 2 | return $stream->jsonSerialize(); |
|
| 52 | } |
||
| 80 |