Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function __construct($url, $postData = null, array $headers = array()) |
||
14 | { |
||
15 | if ($postData !== null) { |
||
16 | $postData = json_encode($postData, JSON_PRETTY_PRINT); |
||
17 | } |
||
18 | |||
19 | if (!empty($params)) { |
||
|
|||
20 | $url .= '?'.http_build_query($params); |
||
21 | } |
||
22 | |||
23 | $headers = [ |
||
24 | 'Content-Type' => 'application/json', |
||
25 | 'Accept' => 'application/json', |
||
26 | ]; |
||
27 | |||
28 | parent::__construct('PUT', $url, $headers, $postData); |
||
29 | } |
||
31 |