Passed
Push — master ( f183b8...6e1b1b )
by Anthony
02:22
created

AccessRight   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 14 1
A configureOptions() 0 4 1
1
<?php
2
3
namespace Ribs\RibsAdminBundle\Form;
4
5
use AppBundle\Entity\Profil;
1 ignored issue
show
Bug introduced by
The type AppBundle\Entity\Profil was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Symfony\Component\Form\AbstractType;
7
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
8
use Symfony\Component\Form\Extension\Core\Type\TextType;
9
use Symfony\Component\Form\FormBuilderInterface;
10
use Symfony\Component\OptionsResolver\OptionsResolver;
11
12
class AccessRight extends AbstractType
13
{
14
	public function buildForm(FormBuilderInterface $builder, array $options)
15
	{
16
		$builder
17
			->add('name', TextType::class, [
18
				'label' => 'Name of the list',
19
				'label_attr' => [
20
					'class' => 'label'
21
				],
22
                'attr' => [],
23
                'required' => true
24
            ])
25
            ->add('submit', SubmitType::class, [
26
		'label' => 'Validate',
27
		'attr' => []
28
	]);
29
    }
30
	
31
	public function configureOptions(OptionsResolver $resolver)
32
	{
33
		$resolver->setDefaults([
34
			'data_class' => \Ribs\RibsAdminBundle\Entity\AccessRight::class,
35
		]);
36
	}
37
}