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 ( 64ce67...1fbca4 )
by Odiseo
04:06
created

ReportDataFetcherConfigurationType   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 41
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getBlockPrefix() 0 3 1
A buildForm() 0 7 1
1
<?php
2
3
namespace Odiseo\SyliusReportPlugin\Form\Type;
4
5
use Odiseo\SyliusReportPlugin\DataFetcher\DelegatingDataFetcherInterface;
6
use Odiseo\SyliusReportPlugin\Model\ReportInterface;
7
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
8
use Symfony\Component\Form\FormBuilderInterface;
9
10
/**
11
 * @author Diego D'amico <[email protected]>
12
 */
13
class ReportDataFetcherConfigurationType extends AbstractResourceType
14
{
15
    /**
16
     * @var DelegatingDataFetcherInterface
17
     */
18
    protected $delegatingDataFetcher;
19
20
    /**
21
     * @var string
22
     */
23
    protected $dataFetcherConfigurationTemplate;
24
25
    public function __construct(
26
        string $dataClass,
27
        array $validationGroups,
28
        DelegatingDataFetcherInterface $delegatingDataFetcher
29
    )
30
    {
31
        parent::__construct($dataClass, $validationGroups);
32
33
        $this->delegatingDataFetcher = $delegatingDataFetcher;
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function buildForm(FormBuilderInterface $builder, array $options)
40
    {
41
        /** @var ReportInterface $report */
42
        $report = $builder->getData();
43
        $dataFetcher = $this->delegatingDataFetcher->getDataFetcher($report);
44
45
        $builder->add('dataFetcherConfiguration', $dataFetcher->getType());
46
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function getBlockPrefix()
52
    {
53
        return 'odiseo_sylius_report';
54
    }
55
}
56