File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change 11
11
use function idn_to_utf8 ;
12
12
use function preg_match ;
13
13
use function rawurldecode ;
14
- use function strpos ;
15
14
use function strtolower ;
16
15
use const INTL_IDNA_VARIANT_UTS46 ;
17
16
Original file line number Diff line number Diff line change 11
11
use function count ;
12
12
use function in_array ;
13
13
use function preg_match ;
14
- use function strpos ;
15
14
use function trim ;
16
15
17
16
final class TopLevelDomains implements TopLevelDomainList
@@ -71,11 +70,10 @@ public static function parse(string $content): array
71
70
foreach ($ file as $ line ) {
72
71
$ line = trim ($ line );
73
72
if ([] === $ data ) {
74
- $ data = self ::extractHeader ($ line );
73
+ $ data = self ::extractHeader ($ line ) + [ ' records ' => []] ;
75
74
continue ;
76
75
}
77
76
78
- $ data ['records ' ] = $ data ['records ' ] ?? [];
79
77
if (!str_contains ($ line , '# ' )) {
80
78
$ data ['records ' ][self ::extractRootZone ($ line )] = 1 ;
81
79
continue ;
You can’t perform that action at this time.
0 commit comments