GalleryType::getParent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
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