| Total Complexity | 6 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 10 | class NumericReadonlyField extends ReadonlyField |
||
| 11 | { |
||
| 12 | protected $suffix = ''; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @return mixed|string |
||
| 16 | */ |
||
| 17 | public function Value() |
||
| 18 | { |
||
| 19 | $value = $this->dataValue(); |
||
| 20 | if (!$value) { |
||
| 21 | $value = 0; |
||
| 22 | } |
||
| 23 | if ($this->suffix) { |
||
| 24 | $value .= $this->suffix; |
||
| 25 | } |
||
| 26 | return $value; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get the value of suffix |
||
| 31 | * @return mixed |
||
| 32 | */ |
||
| 33 | public function getSuffix() |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Set the value of suffix |
||
| 40 | * |
||
| 41 | * @param mixed $suffix |
||
| 42 | * @return $this |
||
| 43 | */ |
||
| 44 | public function setSuffix($suffix) |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * This already is a readonly field. |
||
| 52 | */ |
||
| 53 | public function performReadonlyTransformation() |
||
| 58 |