Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | protected function parse() |
||
21 | { |
||
22 | $numericType = $this->parseNumericType(); |
||
23 | $numericValue = $this->getAttribute(self::ATTR_NUMERIC_VALUE); |
||
24 | |||
25 | if ($numericValue === self::NOT_A_NUMBER) { |
||
26 | return new NonNumeric($numericType); |
||
27 | } |
||
28 | |||
29 | $numericValue = RationalNumber::fromString($numericValue); |
||
30 | |||
31 | return new Numeric($numericType, $numericValue); |
||
32 | } |
||
33 | |||
41 | } |