• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

amalfra / supportbee / 22624055621

03 Mar 2026 12:58PM UTC coverage: 26.282% (-2.9%) from 29.134%
22624055621

push

github

web-flow
Merge pull request #7 from amalfra/dependabot/composer/phpunit/phpunit-9.6.33

Bump phpunit/phpunit from 9.5.26 to 9.6.33

41 of 156 relevant lines covered (26.28%)

0.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/API/Comments.php
1
<?php
2

3
namespace Amalfra\SupportBee\API;
4

5
use Amalfra\SupportBee\HTTP;
6

7
/**
8
 * Class Comments
9
 *
10
 * @package Amalfra\SupportBee\API
11
 */
12
class Comments extends HTTP {
13
  public static function comments($id = 0) {
14
    return self::process_request('tickets/'.$id.'/comments');
×
15
  }
16

17
  public static function create_comment($ticket_id = 0, $options = array()) {
18
    self::validate($options, array(
×
19
      'html', 'text', 'attachment_ids'
×
20
    ), array('html', 'text'));
×
21

22
    $body = array('content' => array());
×
23
    if (isset($body['html'])) {
×
24
      $body['content']['html'] = $options['html'];
×
25
    }
26
    if (isset($body['text'])) {
×
27
      $body['content']['text'] = $options['text'];
×
28
    }
29
    if (isset($body['attachment_ids'])) {
×
30
      $body['content']['attachment_ids'] = $options['attachment_ids'];
×
31
    }
32

33
    return self::process_request('tickets/'.$ticket_id.'/comments', array('comment' => $body), 'POST');
×
34
  }
35
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc