| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function init() |
||
| 17 | { |
||
| 18 | parent::init(); |
||
| 19 | |||
| 20 | $inputName = explode('_', $this->attribute); |
||
| 21 | if (count($inputName) > 1) { |
||
| 22 | $inputName[0] = $inputName[1]; |
||
| 23 | } |
||
| 24 | $this->inputOptions = array_merge( |
||
| 25 | [ |
||
| 26 | 'data-braintree-name' => Inflector::underscore($inputName[0]), |
||
| 27 | 'autocomplete' => 'off', |
||
| 28 | ], |
||
| 29 | $this->inputOptions |
||
| 30 | ); |
||
| 43 |