Total Complexity | 3 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | <?php |
||
14 | class Collector |
||
15 | { |
||
16 | /** |
||
17 | * @var \Pilipinews\Common\Interfaces\CrawlerInterface |
||
18 | */ |
||
19 | protected $crawler; |
||
20 | |||
21 | /** |
||
22 | * @var \Pilipinews\Common\Interfaces\ScraperInterface |
||
23 | */ |
||
24 | protected $scraper; |
||
25 | |||
26 | /** |
||
27 | * Initializes the collector instance. |
||
28 | * |
||
29 | * @param \Pilipinews\Common\Interfaces\CrawlerInterface $crawler |
||
30 | * @param \Pilipinews\Common\Interfaces\ScraperInterface $scraper |
||
31 | */ |
||
32 | 3 | public function __construct(CrawlerInterface $crawler, ScraperInterface $scraper) |
|
37 | 3 | } |
|
38 | |||
39 | /** |
||
40 | * Returns an array of article instances. |
||
41 | * |
||
42 | * @param callable $callback |
||
43 | * @return \Pilipinews\Common\Article[] |
||
44 | */ |
||
45 | 3 | public function collect($callback) |
|
61 |