@@ -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 null; |
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 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @return string|null |
68 | 68 | */ |
69 | - public function getUrl(){ |
|
69 | + public function getUrl() { |
|
70 | 70 | return $this->_url; |
71 | 71 | } |
72 | 72 | |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | * return as associative arrag. |
78 | 78 | * @return mixed|null |
79 | 79 | */ |
80 | - public function getResults(bool $jsonEncode = false){ |
|
81 | - if(empty($this->_results)){ |
|
80 | + public function getResults(bool $jsonEncode = false) { |
|
81 | + if (empty($this->_results)) { |
|
82 | 82 | return null; |
83 | 83 | } |
84 | 84 | return $jsonEncode === false ? |