@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | $this->app->alias(Shodan::class, 'shodan'); |
28 | 28 | |
29 | - $this->app->bind('shodan', function () { |
|
29 | + $this->app->bind('shodan', function() { |
|
30 | 30 | return new Shodan(); |
31 | 31 | }); |
32 | 32 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function provides() |
40 | 40 | { |
41 | - return ['shodan']; |
|
41 | + return [ 'shodan' ]; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | ], 'shodan'); |
55 | 55 | |
56 | 56 | // Registering package commands. |
57 | - $this->commands(['shodan']); |
|
57 | + $this->commands([ 'shodan' ]); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected function mergeConfigFrom($path, $key) |
69 | 69 | { |
70 | - $config = $this->app['config']->get($key, []); |
|
71 | - $this->app['config']->set($key, $this->mergeConfig($config, require $path)); |
|
70 | + $config = $this->app[ 'config' ]->get($key, [ ]); |
|
71 | + $this->app[ 'config' ]->set($key, $this->mergeConfig($config, require $path)); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | if (is_numeric($key)) { |
93 | 93 | continue; |
94 | 94 | } |
95 | - $array[$key] = $this->mergeConfig($value, $merging[$key]); |
|
95 | + $array[ $key ] = $this->mergeConfig($value, $merging[ $key ]); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | return $array; |
@@ -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 ? |