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