GalleryType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 18
ccs 0
cts 4
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configureOptions() 0 10 1
A getParent() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LAG\AdminBundle\Form\Type\Media;
6
7
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
0 ignored issues
show
Bug introduced by
The type Symfony\Bridge\Doctrine\Form\Type\EntityType 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...
8
use Symfony\Component\Form\AbstractType;
9
use Symfony\Component\OptionsResolver\OptionsResolver;
10
11
class GalleryType extends AbstractType
12
{
13
    public function configureOptions(OptionsResolver $resolver)
14
    {
15
        $resolver
16
            ->setDefaults([
17
                'attr' => [
18
                    'class' => 'media-gallery-input',
19
                ],
20
                'multiple' => false,
21
            ])
22
            ->setAllowedTypes('multiple', 'boolean')
23
        ;
24
    }
25
26
    public function getParent(): string
27
    {
28
        return EntityType::class;
29
    }
30
}
31