| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 15 | public static function fromSource(ImportSource $source) |
|
| 21 | { |
||
| 22 | 15 | $index = Index::fromSource($source); |
|
| 23 | |||
| 24 | 15 | return (new self([ |
|
| 25 | 15 | new CleanUp($source), |
|
| 26 | 15 | new CreateWriteIndex($source, $index), |
|
| 27 | 15 | PullFromSource::chunked($source), |
|
| 28 | 15 | new RefreshIndex($index), |
|
| 29 | 15 | new SwitchToNewAndRemoveOldIndex($source, $index), |
|
| 30 | 15 | ]))->flatten()->filter(); |
|
| 31 | } |
||
| 33 |