| Conditions | 5 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 3 | protected function beforeConstruct($data = null) |
|
| 44 | { |
||
| 45 | 3 | if (array_key_exists('additionalData', $data) && is_array($data['additionalData'])) { |
|
| 46 | 3 | foreach ($this->getBoletoFields() as $item) { |
|
| 47 | 3 | $key = 'boletobancario.'.$item; |
|
| 48 | 3 | if (array_key_exists($key, $data['additionalData'])) { |
|
| 49 | 3 | $data[$item] = $data['additionalData'][$key]; |
|
| 50 | 3 | unset($data['additionalData'][$key]); |
|
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 | |||
| 55 | 3 | return parent::beforeConstruct($data); |
|
| 56 | } |
||
| 57 | } |
||
| 58 |