@@ -21,32 +21,35 @@ class IpHandler extends WhoisClient
21
21
* Lucich: I ask me the same question... :-D
22
22
*/
23
23
public $ deepWhois = true ;
24
- public $ REGISTRARS = array (
24
+
25
+ public $ REGISTRARS = [
25
26
'European Regional Internet Registry/RIPE NCC ' => 'whois.ripe.net ' ,
26
27
'RIPE Network Coordination Centre ' => 'whois.ripe.net ' ,
27
28
'Asia Pacific Network Information Center ' => 'whois.apnic.net ' ,
28
29
'Asia Pacific Network Information Centre ' => 'whois.apnic.net ' ,
29
30
'Latin American and Caribbean IP address Regional Registry ' => 'whois.lacnic.net ' ,
30
31
'African Network Information Center ' => 'whois.afrinic.net '
31
- );
32
- public $ HANDLERS = array (
32
+ ];
33
+
34
+ public $ HANDLERS = [
33
35
'whois.krnic.net ' => 'krnic ' ,
34
36
'whois.apnic.net ' => 'apnic ' ,
35
37
'whois.ripe.net ' => 'ripe ' ,
36
38
'whois.arin.net ' => 'arin ' ,
37
39
'whois.lacnic.net ' => 'lacnic ' ,
38
40
'whois.afrinic.net ' => 'afrinic '
39
- );
40
- public $ more_data = array (); // More queries to get more accurated data
41
- public $ done = array ();
41
+ ];
42
+
43
+ public $ more_data = []; // More queries to get more accurated data
44
+ public $ done = [];
42
45
43
46
public function parse ($ data , $ query )
44
47
{
45
- $ result = array (
46
- 'regrinfo ' => array () ,
47
- 'regyinfo ' => array () ,
48
- 'rawdata ' => array () ,
49
- ) ;
48
+ $ result = [
49
+ 'regrinfo ' => [] ,
50
+ 'regyinfo ' => [] ,
51
+ 'rawdata ' => [] ,
52
+ ] ;
50
53
$ result ['regyinfo ' ]['registrar ' ] = 'American Registry for Internet Numbers (ARIN) ' ;
51
54
52
55
if (strpos ($ query , '. ' ) === false ) {
@@ -59,7 +62,7 @@ public function parse($data, $query)
59
62
return null ;
60
63
}
61
64
62
- $ this ->query = array () ;
65
+ $ this ->query = [] ;
63
66
$ this ->query ['server ' ] = 'whois.arin.net ' ;
64
67
$ this ->query ['query ' ] = $ query ;
65
68
@@ -69,10 +72,10 @@ public function parse($data, $query)
69
72
return $ result ;
70
73
}
71
74
72
- $ presults = array () ;
75
+ $ presults = [] ;
73
76
$ presults [] = $ rawdata ;
74
77
$ ip = ip2long ($ query );
75
- $ done = array () ;
78
+ $ done = [] ;
76
79
77
80
while (count ($ presults ) > 0 ) {
78
81
$ rwdata = array_shift ($ presults );
0 commit comments