1 | <?php |
||
22 | class Comparator extends AbstractCallable implements ComparatorInterface |
||
23 | { |
||
24 | use VisiteeTrait; |
||
25 | |||
26 | /** |
||
27 | * @param callable $comparator |
||
28 | * |
||
29 | * @return \Cubiche\Core\Comparable\ComparatorInterface |
||
30 | */ |
||
31 | public static function from(callable $comparator) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function compare($a, $b) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function reverse() |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function otherwise(callable $comparator) |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | protected function innerCallable() |
||
79 | } |
||
80 |