src/Money/Money.php
/**
     * @param Money $moneyToSubtract
     * @return Money
     * @throw \InvalidArgumentException
     */
@param Money $moneyToSubtract
@return Money
@throw \InvalidArgumentException
@param Money $moneyToSubtract @return Money @throw \ InvalidArgumentException
public function subtract(Money $moneyToSubtract)
    {
        if (!$this->isSameCurrency($moneyToSubtract)) {
            throw new \InvalidArgumentException('Currencies does not match');
        }
        return new Money($this->currency(), $this->value() - $moneyToSubtract->value());
    }
public function subtract ( Money $ moneyToSubtract ) { if ( ! $ this -> isSameCurrency ( $ moneyToSubtract ) ) { throw new \ InvalidArgumentException ( 'Currencies does not match' ) ; } return new Money ( $ this -> currency ( ) , $ this -> value ( ) - $ moneyToSubtract -> value ( ) ) ; }
@param Money $moneyToSubtract
 @return Money
 @throw \InvalidArgumentException
@param Money $moneyToSubtract @return Money @throw \ InvalidArgumentException