GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( d79ade...faea90 )
by Odiseo
02:53
created

ImageType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 9 1
A getBlockPrefix() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Odiseo\BlogBundle\Form\Type;
6
7
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
8
use Symfony\Component\Form\Extension\Core\Type\FileType;
9
use Symfony\Component\Form\Extension\Core\Type\TextType;
10
use Symfony\Component\Form\FormBuilderInterface;
11
12
abstract class ImageType extends AbstractResourceType
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function buildForm(FormBuilderInterface $builder, array $options): void
18
    {
19
        $builder
20
            ->add('type', TextType::class, [
21
                'label' => 'sylius.form.image.type',
22
                'required' => false,
23
            ])
24
            ->add('file', FileType::class, [
25
                'label' => 'sylius.form.image.file',
26
            ])
27
        ;
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function getBlockPrefix(): string
34
    {
35
        return 'odiseo_blog_image';
36
    }
37
}
38