1 | <?php |
||
8 | class CodebaseClient |
||
9 | { |
||
10 | protected $curl; |
||
11 | protected $codebaseProjectName; |
||
12 | protected $repositoryName; |
||
13 | protected $headers = [ |
||
14 | 'Accept' => 'application/xml', |
||
15 | 'Content-type' => 'application/xml', |
||
16 | ]; |
||
17 | |||
18 | const WEBSERVICE_URL = 'http://api3.codebasehq.com/'; |
||
19 | |||
20 | public function __construct(Curl $curl, $username, $password, $codebaseProjectName, $repositoryName = null) |
||
31 | |||
32 | public function getTicketsFromIds($ticketIds = []) |
||
54 | |||
55 | public function updateTicketStatus($ticketId, $newStatus) |
||
56 | { |
||
57 | $payload = "<ticket-note> |
||
58 | <changes> |
||
59 | <status-id>" . $newStatus . "</status-id> |
||
60 | </changes> |
||
61 | </ticket-note>"; |
||
62 | |||
63 | $this->curl->post( |
||
64 | self::WEBSERVICE_URL . $this->codebaseProjectName . '/tickets/' . $ticketId . '/notes', |
||
65 | $payload |
||
|
|||
66 | ); |
||
67 | } |
||
68 | |||
69 | public function registerDeployment(Deployment $deployment) |
||
82 | } |
||
83 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: