| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Observer implements CrawlObserver |
||
| 9 | { |
||
| 10 | /** @var callable */ |
||
| 11 | protected $hasCrawled; |
||
| 12 | |||
| 13 | public function __construct(callable $hasCrawled) |
||
| 14 | { |
||
| 15 | $this->hasCrawled = $hasCrawled; |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Called when the crawler will crawl the url. |
||
| 20 | * |
||
| 21 | * @param \safaeean\Crawler\Url $url |
||
| 22 | */ |
||
| 23 | public function willCrawl(Url $url) |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Called when the crawler has crawled the given url. |
||
| 29 | * |
||
| 30 | * @param \safaeean\Crawler\Url $url |
||
| 31 | * @param \Psr\Http\Message\ResponseInterface|null $response |
||
| 32 | * @param \safaeean\Crawler\Url $foundOnUrl |
||
| 33 | */ |
||
| 34 | public function hasBeenCrawled(Url $url, $response, Url $foundOnUrl = null) |
||
| 35 | { |
||
| 36 | ($this->hasCrawled)($url, $response); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Called when the crawl has ended. |
||
| 41 | */ |
||
| 42 | public function finishedCrawling() |
||
| 44 | } |
||
| 45 | } |
||
| 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