| Conditions | 4 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 4.0072 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 100 | public function configureOptions(OptionsResolver $resolver) |
|
| 24 | { |
||
| 25 | $map_attr = function (Options $options, $value) { |
||
| 26 | 100 | if ($value === null) { |
|
| 27 | $value = []; |
||
| 28 | } |
||
| 29 | 100 | $value['rows'] = !empty($options['widget_config']['height']) ? $options['widget_config']['height'] : 6; |
|
| 30 | 100 | $value['cols'] = !empty($options['widget_config']['width']) ? $options['widget_config']['width'] : 50; |
|
| 31 | |||
| 32 | 100 | return $value; |
|
| 33 | 1 | }; |
|
| 34 | 1 | $resolver->setDefault('attr', $map_attr); |
|
| 35 | |||
| 36 | 1 | helper::add_normalizers($resolver, [ |
|
| 37 | 'type_config' => [ |
||
| 38 | 1 | 'output_mode' => 'html', |
|
| 39 | 1 | 'specialchars_quotes' => ENT_QUOTES, |
|
| 40 | 1 | 'specialchars_charset' => 'UTF-8', |
|
| 41 | 'forbidden_patterns' => [], |
||
| 42 | 1 | 'maxlength' => 0, |
|
| 43 | 'purify' => false, |
||
| 44 | 'purify_config' => [] |
||
| 45 | ] |
||
| 59 |