Conditions | 3 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function configureOptions(OptionsResolver $options) |
||
33 | { |
||
34 | $options->setDefault('property', null); |
||
35 | $options->setAllowedTypes('property', ['string', 'null']); |
||
36 | $options->setNormalizer('property', function (OptionsResolver $options, $value) { |
||
37 | if (null !== $value) { |
||
38 | return $value; |
||
39 | } |
||
40 | |||
41 | return $options['column_name']; |
||
42 | }); |
||
43 | $options->setNormalizer('sort_field', function (OptionsResolver $options, $value) { |
||
44 | if (null !== $value) { |
||
45 | return $value; |
||
46 | } |
||
47 | |||
48 | return $options['column_name']; |
||
49 | }); |
||
50 | } |
||
51 | |||
56 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..