LessonProgressType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 6
c 1
b 0
f 1
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configureOptions() 0 4 1
A buildForm() 0 5 1
1
<?php
2
3
namespace App\Form;
4
5
use Sonata\Form\Type\BooleanType;
6
use Symfony\Component\Form\AbstractType;
7
use Symfony\Component\Form\FormBuilderInterface;
8
use Symfony\Component\OptionsResolver\OptionsResolver;
9
10
class LessonProgressType extends AbstractType
11
{
12
    public function buildForm(FormBuilderInterface $builder, array $options): void
13
    {
14
        $builder
15
            ->add('completed', BooleanType::class, [
16
                'required' => false,
17
            ])
18
        ;
19
    }
20
21
    public function configureOptions(OptionsResolver $resolver): void
22
    {
23
        $resolver->setDefaults([
24
            'csrf_protection' => false,
25
        ]);
26
    }
27
}
28