6 * @author Michael Wallner <mike@php.net>
13 * @package hikke\Event
15 abstract class Priority
implements Prioritized
18 * Compare an instance of a prioritzed object ot another
19 * @param \hikke\Event\Prioritized $other
22 public function compareTo(Prioritized
$other) {
23 return static::compare($this, $other);
28 * @param \hikke\Event\Prioritized $a
29 * @param \hikke\Event\Prioritized $b
32 public static function compare(Prioritized
$a, Prioritized
$b) {
33 if ($a->getPriority() < $b->getPriority()) {
35 } elseif ($b->getPriority() < $a->getPriority()) {
38 // @codeCoverageIgnoreStart
40 // @codeCoverageIgnoreEnd