| Total Complexity | 5 | 
| Total Lines | 49 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 0 | ||
| 1 | <?php | ||
| 19 | final class NodesCollection | ||
| 20 | { | ||
| 21 | /** | ||
| 22 | * Collection of \Algolia\ScoutExtended\Splitters\HtmlSplitter\NodeCollection | ||
| 23 | * and int as importance after each\Algolia\ScoutExtended\Splitters\HtmlSplitter\NodeCollection. | ||
| 24 | * | ||
| 25 | * @var array | ||
| 26 | */ | ||
| 27 | private $nodesImportance = []; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * String. | ||
| 31 | */ | ||
| 32 | private const IMPORTANCE = 'importance'; | ||
| 33 | |||
| 34 | /** | ||
| 35 | * Importance need to be add after to avoid polluted queue. | ||
| 36 | * | ||
| 37 | * @param \Algolia\ScoutExtended\Splitters\HtmlSplitter\NodeCollection $nodes | ||
| 38 | * | ||
| 39 | * @return void | ||
| 40 | */ | ||
| 41 | 5 | public function push(NodeCollection $nodes): void | |
| 45 | 5 | } | |
| 46 | |||
| 47 | /** | ||
| 48 | * Convert to array. | ||
| 49 | * | ||
| 50 | * @return array | ||
| 51 | */ | ||
| 52 | 5 | public function toArray(): array | |
| 70 |