| 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 array |
||
| 25 | */ |
||
| 26 | public function normalizeAgainst(Config $config): array |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Filter by min score. |
||
| 40 | * |
||
| 41 | * @param int $minScore |
||
| 42 | * @return \Closure |
||
| 43 | */ |
||
| 44 | private function filterByMinScore($minScore): \Closure |
||
| 52 | } |
||
| 53 |