| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function isFiltered(UriInterface $currentUri, UriInterface $startUri) |
||
| 21 | { |
||
| 22 | /* @var $currentUri Uri */ |
||
| 23 | /* @var $startUri Uri */ |
||
| 24 | |||
| 25 | $startDomainElements = explode('.', $startUri->getHost()); |
||
| 26 | $currentDomainElements = explode('.', $currentUri->getHost()); |
||
| 27 | |||
| 28 | $startDomainLength = count($startDomainElements); |
||
| 29 | $currentDomainLength = count($currentDomainElements); |
||
| 30 | |||
| 31 | if ($currentDomainLength < $startDomainLength) { |
||
| 32 | return true; |
||
| 33 | } |
||
| 34 | |||
| 35 | return $currentUri->getHost($startDomainLength) !== $startUri->getHost($startDomainLength); |
||
| 36 | } |
||
| 37 | |||
| 47 |