| Conditions | 2 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function configureOptions(OptionsResolver $resolver): void |
||
| 24 | { |
||
| 25 | $resolver |
||
| 26 | ->setDefaults([ |
||
| 27 | 'type' => null, |
||
| 28 | 'options' => [], |
||
| 29 | ]) |
||
| 30 | // Set allowed fields type from tagged services |
||
| 31 | ->setAllowedValues('type', $this->allowedFields) |
||
| 32 | ->setAllowedTypes('type', 'string') |
||
| 33 | ->setAllowedTypes('options', 'array') |
||
| 34 | ->setNormalizer('type', function (Options $options, $value) { |
||
| 35 | if (null === $value) { |
||
| 36 | $value = ''; |
||
| 37 | } |
||
| 38 | |||
| 39 | return $value; |
||
| 40 | }) |
||
| 54 |