private function __construct($amount, Currency $currency) { $this->amount = $amount; $this->currency = $currency; }
/** * @param integer $amount */ public function __construct($amount, Currency $currency = null) { if ($currency === null) { $currency = new Currency(self::DEFAULT_CURRENCY_NAME); } parent::__construct($amount, $currency); }