예제 #1
0
 /**
  * @inheritdoc
  */
 public function compare(IComparable $other) : int
 {
     if (!$other instanceof static) {
         throw new LogicException('You cannot compare sheep with the goat.');
     }
     return $this->int <=> $other->getInt();
 }