Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
64 | 1 | public function comment($spaceId, $threadId, $comment, array $mentions = [], array $files = [], $guestSpaceId = null): array |
|
65 | { |
||
66 | 1 | $options = ['json' => [ |
|
67 | 1 | 'space' => $spaceId, |
|
68 | 1 | 'thread' => $threadId, |
|
69 | 1 | 'comment' => [ |
|
70 | 1 | 'text' => $comment, |
|
71 | 1 | 'mentions' => $mentions, |
|
72 | 1 | 'files' => $files |
|
73 | 1 | ], |
|
74 | 1 | ]]; |
|
75 | |||
76 | /** @var JsonStream $stream */ |
||
77 | 1 | $stream = $this->client |
|
78 | 1 | ->post(KintoneApi::generateUrl('space/thread/comment.json', $guestSpaceId), $options) |
|
79 | 1 | ->getBody(); |
|
80 | |||
81 | 1 | return $stream->jsonSerialize(); |
|
82 | } |
||
84 |