| 1 | <?php declare(strict_types = 1); |
||
| 7 | class ResultCollection extends Collection |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Order results by their score in descending order. |
||
| 11 | * @return self |
||
| 12 | */ |
||
| 13 | public function orderByScoreDesc(): self |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Filter the results where their score is >= the provided $score |
||
| 22 | * @param float $score Score to filter by. |
||
| 23 | * @return static |
||
| 24 | */ |
||
| 25 | public function whereScoreAbove(float $score) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get the highest number of commits. |
||
| 34 | * @return integer |
||
| 35 | */ |
||
| 36 | public function maxCommits(): int |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get the highest complexity. |
||
| 45 | * @return integer |
||
| 46 | */ |
||
| 47 | public function maxComplexity(): int |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Override the original toArray() method to remove those disordered indices. |
||
| 56 | * |
||
| 57 | * @return array |
||
| 58 | */ |
||
| 59 | public function toArray(): array |
||
| 71 | } |
||
| 72 |