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.

OutputType   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 4 2
A reverseTransform() 0 3 1
A transform() 0 3 1
A configureOptions() 0 6 1
A getBlockPrefix() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\Form\Type;
13
14
use Symfony\Component\Form\AbstractType;
15
use Symfony\Component\Form\DataTransformerInterface;
16
use Symfony\Component\Form\FormBuilderInterface;
17
use Symfony\Component\OptionsResolver\OptionsResolver;
18
19
final class OutputType extends AbstractType implements DataTransformerInterface
20
{
21
    public function buildForm(FormBuilderInterface $builder, array $options): void
22
    {
23
        if ('' === $options['empty_data']) {
24
            $builder->addViewTransformer($this);
25
        }
26
    }
27
28
    public function configureOptions(OptionsResolver $resolver): void
29
    {
30
        $resolver->setDefaults([
31
            'compound'  => false,
32
            'required'  => false,
33
            'disabled'  => true,
34
        ]);
35
    }
36
37
    public function transform($data)
38
    {
39
        return $data;
40
    }
41
42
    public function reverseTransform($data): string
43
    {
44
        return $data ?? '';
45
    }
46
47
    public function getBlockPrefix(): string
48
    {
49
        return 'output';
50
    }
51
}
52