Conditions | 6 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 6.0702 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 15 | public function setData($data) |
|
18 | { |
||
19 | 15 | foreach ($this->getInputs() as $name => $input) { |
|
20 | 15 | if ($input instanceof InputInterface) { |
|
21 | 15 | if (is_numeric($name)) { |
|
22 | $name = $input->getName(); |
||
23 | } |
||
24 | 15 | if (!empty($name) && !array_key_exists($name, $data)) { |
|
25 | 7 | $data[$name] = null; |
|
26 | } |
||
27 | } |
||
28 | } |
||
29 | |||
30 | 15 | return parent::setData($data); |
|
31 | } |
||
32 | } |
||
33 |