safaeean /
laravel-sitemap
| 1 | <?php |
||
| 2 | |||
| 3 | namespace safaeean\Sitemap\Crawler; |
||
| 4 | |||
| 5 | use safaeean\Crawler\Url; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use safaeean\Crawler\CrawlObserver; |
||
|
0 ignored issues
–
show
The type
safaeean\Crawler\CrawlObserver was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 7 | |||
| 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) |
||
| 24 | { |
||
| 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() |
||
| 43 | { |
||
| 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