Exemplo n.º 1
0
 /**
  * @return Numericity
  */
 protected function parse()
 {
     $numericType = $this->parseNumericType();
     $numericValue = $this->getAttribute(self::ATTR_NUMERIC_VALUE);
     if ($numericValue === self::NOT_A_NUMBER) {
         return new NonNumeric($numericType);
     }
     $numericValue = RationalNumber::fromString($numericValue);
     return new Numeric($numericType, $numericValue);
 }