Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
61 | private function post($url, $body) |
||
62 | { |
||
63 | $headers = $this->auth->authorizationV2($url, 'POST', $body, 'application/json'); |
||
64 | $headers['Content-Type']='application/json'; |
||
65 | $ret = Client::post($url, $body, $headers); |
||
66 | if (!$ret->ok()) { |
||
67 | print($ret->statusCode); |
||
68 | return array(null, new Error($url, $ret)); |
||
69 | } |
||
70 | $r = ($ret->body === null) ? array() : $ret->json(); |
||
71 | return array($r, null); |
||
72 | } |
||
73 | } |
||
74 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.