1 | <?php declare(strict_types = 1); |
||
8 | class ResultCollection extends Collection |
||
9 | { |
||
10 | /** |
||
11 | * Order results by their score in descending order. |
||
12 | * @return self |
||
13 | */ |
||
14 | public function orderByScoreDesc(): self |
||
20 | |||
21 | /** |
||
22 | * Normalize results against config. |
||
23 | * @param Config $config |
||
24 | * @return self |
||
25 | */ |
||
26 | public function normalizeAgainst(Config $config): self |
||
34 | |||
35 | /** |
||
36 | * Filter by min score. |
||
37 | * |
||
38 | * @param int $minScore |
||
39 | * @return \Closure |
||
40 | */ |
||
41 | private function filterByMinScore($minScore): \Closure |
||
49 | |||
50 | /** |
||
51 | * Override the original toArray() method to remove those disordered indices. |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | public function toArray(): array |
||
59 | } |
||
60 |