| Total Complexity | 8 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | final class UrlMatches extends Constraint |
||
| 13 | { |
||
| 14 | private array $partsToMatch; |
||
| 15 | private array $url; |
||
| 16 | |||
| 17 | public function __construct(string $url, array $partsToMatch = []) |
||
| 18 | { |
||
| 19 | $this->partsToMatch = $partsToMatch; |
||
| 20 | $this->url = $this->parseUrl($url); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function toString(): string |
||
| 24 | { |
||
| 25 | return 'matches '.$this->exporter()->export($this->url); |
||
| 26 | } |
||
| 27 | |||
| 28 | protected function matches($other): bool |
||
| 29 | { |
||
| 30 | return $this->parseUrl($other) === $this->url; |
||
| 31 | } |
||
| 32 | |||
| 33 | protected function failureDescription($other): string |
||
| 34 | { |
||
| 35 | return parent::failureDescription($this->parseUrl($other)); |
||
| 36 | } |
||
| 37 | |||
| 38 | private function parseUrl(string $url): array |
||
| 53 | } |
||
| 54 | } |
||
| 55 |
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