| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.0261 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | 6 | protected function getNormalizedValue($value) |
|
| 44 | { |
||
| 45 | 6 | if (!\is_numeric($value)) { |
|
| 46 | return 0; |
||
| 47 | } |
||
| 48 | |||
| 49 | 6 | $numberValue = \trim($value) * 1; |
|
| 50 | |||
| 51 | 6 | if ($this->getDecimals() !== null) { |
|
| 52 | 1 | $numberValue = \round($numberValue, $this->getDecimals()); |
|
| 53 | } |
||
| 54 | |||
| 55 | 6 | return $numberValue; |
|
| 56 | } |
||
| 58 |