Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | public function match(UriInterface $uri) |
||
39 | { |
||
40 | $currentHostname = $uri->getHost(); |
||
41 | |||
42 | if ($this->allowSubDomains) { |
||
43 | // only use hostname.tld for comparison |
||
44 | $currentHostname = join('.', array_slice(explode('.', $currentHostname), -2)); |
||
45 | } |
||
46 | |||
47 | return !in_array($currentHostname, $this->allowedHosts); |
||
48 | } |
||
50 |