Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 6 | private function loadFromArray($data) |
|
37 | { |
||
38 | 6 | foreach($data['chan'] AS $channel) |
|
39 | { |
||
40 | 6 | $this->fields['channels']->addItem(new Channel($channel)); |
|
41 | 6 | } |
|
42 | |||
43 | 6 | $this->fields['signal'] = new Signal($data['signal']); |
|
44 | 6 | $this->fields['battery'] = new Battery($data['battery']); |
|
45 | 6 | } |
|
46 | |||
71 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.