@@ -44,11 +44,11 @@ |
||
44 | 44 | public function getIp(string $url) |
45 | 45 | { |
46 | 46 | $domain = parse_url($url); |
47 | - if (empty($domain['host'])) { |
|
47 | + if (empty($domain[ 'host' ])) { |
|
48 | 48 | return; |
49 | 49 | } |
50 | 50 | |
51 | - $ip = gethostbyname($domain['host']); |
|
51 | + $ip = gethostbyname($domain[ 'host' ]); |
|
52 | 52 | |
53 | 53 | return filter_var($ip, FILTER_VALIDATE_IP) ? $ip : null; |
54 | 54 | } |
@@ -75,8 +75,7 @@ |
||
75 | 75 | $status = $dataObject->getHttpStatus(); |
76 | 76 | |
77 | 77 | $response = $dataObject->error_code != 0 ? |
78 | - ['message' => $dataObject->error_message] : |
|
79 | - json_decode($dataObject->response, true); |
|
78 | + [ 'message' => $dataObject->error_message ] : json_decode($dataObject->response, true); |
|
80 | 79 | |
81 | 80 | $data = [ |
82 | 81 | 'status' => $status, |