/** * Compares current Money object to another * * Will return -1, 0, 1 if the amount of this Money object * is respectively less than, equal to, or greater than the other. * * This is useful when using it as a compare function * for usort() and the likes. * * @param MoneyInterface $other * * @return integer Comparison value */ public function compareTo(MoneyInterface $other) { return $this->wrappedMoney->compareTo($this->newWrappedMoneyFromMoney($other)); }