| Total Complexity | 2 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class ReviewFilter extends AbstractType |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | */ |
||
| 24 | 2 | public function buildForm(FormBuilderInterface $builder, array $options) |
|
| 25 | { |
||
| 26 | $dateTimeFieldOptions = [ |
||
| 27 | 2 | 'widget' => 'single_text', |
|
| 28 | 'format' => 'yyyy-MM-dd', |
||
| 29 | ]; |
||
| 30 | |||
| 31 | $builder |
||
| 32 | 2 | ->add('body', Filters\TextFilterType::class) |
|
| 33 | 2 | ->add('rating', Filters\TextFilterType::class) |
|
| 34 | 2 | ->add( |
|
| 35 | 2 | 'publicationDate', |
|
| 36 | 2 | Filters\DateTimeRangeFilterType::class, |
|
| 37 | [ |
||
| 38 | 2 | 'left_datetime_options' => $dateTimeFieldOptions, |
|
| 39 | 2 | 'right_datetime_options' => $dateTimeFieldOptions, |
|
| 40 | ] |
||
| 41 | ); |
||
| 42 | 2 | } |
|
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritdoc} |
||
| 46 | */ |
||
| 47 | 2 | public function configureOptions(OptionsResolver $resolver) |
|
| 51 | ]); |
||
| 52 | 2 | } |
|
| 54 |