| Total Complexity | 6 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class CurlHelper |
||
| 13 | { |
||
| 14 | |||
| 15 | private $url; |
||
| 16 | private $headers; |
||
| 17 | private $data; |
||
| 18 | private $type; |
||
| 19 | |||
| 20 | public function __construct($url, $type = "POST") |
||
| 21 | { |
||
| 22 | $this->url = $url; |
||
| 23 | $this->type = $type; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function headers(array $headers) { |
||
| 27 | $newHeaders = []; |
||
| 28 | foreach($headers as $key=>$val) { |
||
| 29 | $newHeaders[] = $key.": ".$val; |
||
| 30 | } |
||
| 31 | $this->headers = $newHeaders; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function data(array $data) { |
||
| 36 | } |
||
| 37 | |||
| 38 | public function send() { |
||
| 54 | } |
||
| 55 | } |
||
| 56 | } |