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