Total Complexity | 6 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class PullFromSource |
||
12 | { |
||
13 | /** |
||
14 | * @var ImportSource |
||
15 | */ |
||
16 | private $source; |
||
17 | |||
18 | /** |
||
19 | * @param ImportSource $source |
||
20 | */ |
||
21 | 17 | public function __construct(ImportSource $source) |
|
24 | 17 | } |
|
25 | |||
26 | 16 | public function handle(): void |
|
27 | { |
||
28 | 16 | $results = $this->source->get()->filter->shouldBeSearchable(); |
|
29 | 16 | if (! $results->isEmpty()) { |
|
30 | 15 | $results->first()->searchableUsing()->update($results); |
|
31 | } |
||
32 | 16 | } |
|
33 | |||
34 | 10 | public function estimate(): int |
|
37 | } |
||
38 | |||
39 | 10 | public function title(): string |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param ImportSource $source |
||
46 | * @return Collection |
||
47 | */ |
||
48 | 18 | public static function chunked(ImportSource $source): Collection |
|
55 |