Skip to content

Commit 189c99e

Browse files
committed
Improve internal codebase
1 parent 31462d1 commit 189c99e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/Idna.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use function idn_to_utf8;
1212
use function preg_match;
1313
use function rawurldecode;
14-
use function strpos;
1514
use function strtolower;
1615
use const INTL_IDNA_VARIANT_UTS46;
1716

src/TopLevelDomains.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use function count;
1212
use function in_array;
1313
use function preg_match;
14-
use function strpos;
1514
use function trim;
1615

1716
final class TopLevelDomains implements TopLevelDomainList
@@ -71,11 +70,10 @@ public static function parse(string $content): array
7170
foreach ($file as $line) {
7271
$line = trim($line);
7372
if ([] === $data) {
74-
$data = self::extractHeader($line);
73+
$data = self::extractHeader($line) + ['records' => []];
7574
continue;
7675
}
7776

78-
$data['records'] = $data['records'] ?? [];
7977
if (!str_contains($line, '#')) {
8078
$data['records'][self::extractRootZone($line)] = 1;
8179
continue;

0 commit comments

Comments
 (0)