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.
Completed
Push — master ( 2c7b14...3be0f5 )
by Mario
02:10
created

getCollectedItemsCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Netgen\Bundle\InformationCollectionBundle\DataCollector;
6
7
use Symfony\Component\HttpFoundation\Request;
8
use Symfony\Component\HttpFoundation\Response;
9
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
10
11
class InformationCollectionCollector extends DataCollector
12
{
13
    public function collect(Request $request, Response $response, \Exception $exception = null)
14
    {
15
        $collectedItemsCount = 0;
16
        $collectedItems = null;
17
        if ($request->get('ezrepoforms_information_collection') !== null) {
18
            $collectedItems = $request->get('ezrepoforms_information_collection')['fieldsData'];
19
            $collectedItemsCount = count($collectedItems);
20
        }
21
22
        $this->data = [
23
            'collected_items' => $collectedItems,
24
            'collected_items_count' => $collectedItemsCount,
25
        ];
26
    }
27
28
    public function reset()
29
    {
30
        $this->data = [];
31
    }
32
33
    public function getName()
34
    {
35
        return 'netgen_information_collection_collector';
36
    }
37
38
    public function getCollectedItems(): array
39
    {
40
        return $this->data['collected_items'];
41
    }
42
43
    public function getCollectedItemsCount(): int
44
    {
45
        return $this->data['collected_items_count'];
46
    }
47
}
48