| Conditions | 6 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function detect(ProfileContainer $profileContainer) |
||
| 29 | { |
||
| 30 | $url = $this->request->getUrl()->getHost(); |
||
| 31 | |||
| 32 | /** @var Profile $profile */ |
||
| 33 | foreach ($profileContainer as $profile) |
||
| 34 | foreach ($profile->getDomains() as $domain) |
||
| 35 | if ((Strings::contains($domain, '*') && $this->match($domain, $url)) || ($domain === $url)) |
||
| 36 | return $profile; |
||
| 37 | |||
| 38 | return null; |
||
| 39 | } |
||
| 40 | |||
| 71 |