1 | <?php |
||
5 | final class Match |
||
6 | { |
||
7 | /** |
||
8 | * @var float |
||
9 | */ |
||
10 | public $quality; |
||
11 | |||
12 | /** |
||
13 | * @var int |
||
14 | */ |
||
15 | public $score; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | public $index; |
||
21 | |||
22 | 61 | public function __construct($quality, $score, $index) |
|
28 | |||
29 | /** |
||
30 | * @param Match $a |
||
31 | * @param Match $b |
||
32 | * |
||
33 | * @return int |
||
34 | */ |
||
35 | 35 | public static function compare(Match $a, Match $b) |
|
47 | |||
48 | /** |
||
49 | * @param array $carry reduced array |
||
50 | * @param Match $match match to be reduced |
||
51 | * |
||
52 | * @return Match[] |
||
53 | */ |
||
54 | 61 | public static function reduce(array $carry, Match $match) |
|
62 | } |
||
63 |