1: | <?php declare(strict_types=1); |
2: | |
3: | namespace Salient\Contract\Core; |
4: | |
5: | /** |
6: | * @api |
7: | */ |
8: | interface Comparable |
9: | { |
10: | /** |
11: | * Get an integer less than, equal to, or greater than zero when $a is less |
12: | * than, equal to, or greater than $b, respectively |
13: | * |
14: | * @param static $a |
15: | * @param static $b |
16: | * @return int A value that can be used instead of `$a <=> $b`. |
17: | */ |
18: | public static function compare($a, $b): int; |
19: | } |
20: |