1 | <?php |
||
2 | |||
3 | namespace Radowoj\Crawla; |
||
4 | |||
5 | use GuzzleHttp\ClientInterface; |
||
0 ignored issues
–
show
|
|||
6 | use Radowoj\Crawla\Link\CollectionInterface; |
||
7 | |||
8 | interface CrawlerInterface |
||
9 | { |
||
10 | /** |
||
11 | * Gets current link selector. |
||
12 | * |
||
13 | * @return string |
||
14 | */ |
||
15 | public function getLinkSelector(): string; |
||
16 | |||
17 | /** |
||
18 | * Sets CSS selector for links that crawler should follow. |
||
19 | * |
||
20 | * @param string $linkSelector |
||
21 | * |
||
22 | * @return \Radowoj\Crawla\CrawlerInterface |
||
23 | */ |
||
24 | public function setLinkSelector(string $linkSelector): CrawlerInterface; |
||
25 | |||
26 | /** |
||
27 | * @param CollectionInterface $linksVisited |
||
28 | * |
||
29 | * @return Crawler |
||
30 | */ |
||
31 | public function setVisited(CollectionInterface $linksVisited): CrawlerInterface; |
||
32 | |||
33 | /** |
||
34 | * @param CollectionInterface $linksQueued |
||
35 | * |
||
36 | * @return Crawler |
||
37 | */ |
||
38 | public function setQueued(CollectionInterface $linksQueued): CrawlerInterface; |
||
39 | |||
40 | /** |
||
41 | * Returns visited links collection (creates empty if not set). |
||
42 | * |
||
43 | * @return CollectionInterface |
||
44 | */ |
||
45 | public function getVisited(): CollectionInterface; |
||
46 | |||
47 | /** |
||
48 | * Returns queued links collection (creates empty if not set). |
||
49 | * |
||
50 | * @return CollectionInterface |
||
51 | */ |
||
52 | public function getQueued(): CollectionInterface; |
||
53 | |||
54 | /** |
||
55 | * Returns too deep to visit links collection (creates empty if not set). |
||
56 | * |
||
57 | * @return CollectionInterface |
||
58 | */ |
||
59 | public function getTooDeep(): CollectionInterface; |
||
60 | |||
61 | /** |
||
62 | * Sets callback that will be called when discovering a link (to determine if it should be queued for visiting). |
||
63 | * |
||
64 | * @param callable $urlValidatorCallback |
||
65 | * |
||
66 | * @return \Radowoj\Crawla\CrawlerInterface |
||
67 | */ |
||
68 | public function setUrlValidatorCallback(callable $urlValidatorCallback): CrawlerInterface; |
||
69 | |||
70 | /** |
||
71 | * @param callable $pageVisitedCallback |
||
72 | * |
||
73 | * @return \Radowoj\Crawla\CrawlerInterface |
||
74 | */ |
||
75 | public function setPageVisitedCallback(callable $pageVisitedCallback): CrawlerInterface; |
||
76 | |||
77 | /** |
||
78 | * Start crawling. |
||
79 | * |
||
80 | * @param int $maxDepth - max visits depth |
||
81 | * |
||
82 | * @return bool |
||
83 | */ |
||
84 | public function crawl(int $maxDepth = self::DEPTH_DEFAULT); |
||
0 ignored issues
–
show
|
|||
85 | } |
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