| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function __construct($url, $postData = null, array $params = array()) |
||
| 14 | { |
||
| 15 | if ($postData !== null) { |
||
| 16 | $postData = \GuzzleHttp\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 | ]; |
||
| 26 | |||
| 27 | parent::__construct('POST', $url, $headers, $postData); |
||
| 28 | } |
||
| 30 |