| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class Client implements ClientInterface |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Client constructor. |
||
| 19 | * |
||
| 20 | * @throws DisallowedUrlException |
||
| 21 | */ |
||
| 22 | public function __construct() |
||
| 23 | { |
||
| 24 | if(!ini_get('allow_url_fopen')){ |
||
| 25 | throw new DisallowedUrlException(); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Makes http-request and returns raw data |
||
| 31 | * |
||
| 32 | * @param string $url |
||
| 33 | * |
||
| 34 | * @return string |
||
| 35 | * |
||
| 36 | * @throws UnavailableServiceException |
||
| 37 | */ |
||
| 38 | public function sendHttpRequest(string $url): string |
||
| 45 | } |
||
| 46 | } |
||
| 47 |