Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function visit($hostname, ParsedHostname $parsedHostname): void |
||
19 | { |
||
20 | if (null !== $parsedHostname->getSuffix()) { |
||
21 | $suffix = string($parsedHostname->getSuffix()); |
||
22 | if ($suffix->contains('.')) { |
||
23 | $suffixParts = \explode('.', (string) $suffix); |
||
24 | $parsedHostname->setTld(\array_pop($suffixParts)); |
||
25 | } else { |
||
26 | $parsedHostname->setTld((string) $suffix); |
||
27 | } |
||
28 | } |
||
29 | } |
||
30 | } |
||
31 |