Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.2098 |
Changes | 0 |
1 | <?php |
||
45 | 3 | protected function getNormalizedValue($value) |
|
46 | { |
||
47 | 3 | if (!is_numeric($value)) { |
|
48 | return 0; |
||
49 | } |
||
50 | |||
51 | 3 | $numberValue = trim($value) + 0; |
|
52 | |||
53 | 3 | if ($this->getDecimals() !== null) { |
|
54 | $numberValue = round($numberValue, $this->getDecimals()); |
||
55 | } |
||
56 | |||
57 | 3 | return $numberValue; |
|
58 | } |
||
59 | } |
||
60 |