1: <?php declare(strict_types=1);
2:
3: namespace Salient\Contract\Core;
4:
5: /**
6: * Able to compare instances of itself, e.g. for sorting purposes
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: * This method returns the equivalent of:
15: *
16: * ```php
17: * $a <=> $b
18: * ```
19: *
20: * @param static $a
21: * @param static $b
22: */
23: public static function compare($a, $b): int;
24: }
25: