示例#1
0
 /**
  * sameValueAs.
  *
  * @param ValueObjectInterface|static $valueObject
  *
  * @return bool
  */
 public function sameValueAs(ValueObjectInterface $valueObject)
 {
     if (!Util::classEquals($this, $valueObject)) {
         return false;
     }
     return $this->amount()->sameValueAs($valueObject->amount()) && $this->currency()->sameValueAs($valueObject->currency());
 }
示例#2
0
 protected function assertSameClass(NumberInterface $number)
 {
     if (!Util::classEquals($this, $number)) {
         throw new InvalidArgumentException($number, array(Util::className($this)));
     }
 }