| Conditions | 3 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public static function find(string $link, string $className, string $field, ?bool $removeFinalSlash = true) |
||
| 21 | { |
||
| 22 | $link = strtolower($link); |
||
| 23 | if($removeFinalSlash) { |
||
| 24 | $link = rtrim($link, '/'); |
||
| 25 | } |
||
| 26 | $linkObject = DBField::create_field('ExternalURL', $link); |
||
| 27 | $domain = $linkObject->Domain(); |
||
| 28 | if(strpos($domain, 'www.') === 0) { |
||
| 29 | $domainWWW = $domain; |
||
| 30 | $domainNoWWW = $linkObject->Domain()->noWWW(); |
||
| 31 | } else { |
||
| 32 | $domainWWW = 'www' . $domain; |
||
| 33 | $domainNoWWW = $domain; |
||
| 34 | } |
||
| 35 | $items = [ |
||
| 36 | $domainWWW, |
||
| 37 | $domainNoWWW, |
||
| 38 | 'https://' . $domainWWW, |
||
| 39 | 'https://' . $domainNoWWW, |
||
| 40 | 'http://' . $domainWWW, |
||
| 41 | 'http://' . $domainNoWWW, |
||
| 42 | ]; |
||
| 43 | return $className::get()->filter([$field => $items])->first(); |
||
| 44 | } |
||
| 46 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths