Total Complexity | 4 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
3 | class Nip_Form_Element_Money extends Nip_Form_Element_Input |
||
4 | { |
||
5 | protected $_type = 'money'; |
||
6 | |||
7 | public function init() |
||
8 | { |
||
9 | parent::init(); |
||
10 | $this->setAttrib('type', 'number'); |
||
11 | $this->setOption('currency', ''); |
||
12 | } |
||
13 | |||
14 | /** |
||
15 | * @inheritDoc |
||
16 | */ |
||
17 | public function setValue($value) |
||
18 | { |
||
19 | if (is_object($value)) { |
||
20 | /** @var \ByTIC\Money\Money $value */ |
||
21 | $this->setOption('currency', $value->getCurrency()); |
||
22 | $value = $value->formatByDecimal(); |
||
23 | } |
||
24 | return parent::setValue($value); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @inheritDoc |
||
29 | */ |
||
30 | public function getValue($requester = 'abstract') |
||
33 | } |
||
34 | } |
||
35 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.