Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function visit($hostname, ParsedHostname $parsedHostname): void |
||
34 | { |
||
35 | $hostname = string($hostname); |
||
36 | if (!$parsedHostname->isIp() && $hostname->contains('.')) { |
||
37 | $suffix = $this->findSuffix($hostname); |
||
38 | if (null !== $suffix) { |
||
39 | $parsedHostname->setSuffix($suffix); |
||
40 | } else { |
||
41 | $hostnameParts = \explode('.', $hostname); |
||
42 | $parsedHostname->setSuffix(\array_pop($hostnameParts)); |
||
43 | } |
||
44 | } |
||
45 | } |
||
46 | |||
61 |