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 ( a98c69...832924 )
by Mario
02:14 queued 38s
created

CollectInformation   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 28
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 14 3
1
<?php
2
3
namespace Netgen\Bundle\InformationCollectionBundle\Controller;
4
5
use eZ\Publish\Core\MVC\Symfony\View\BaseView;
6
use eZ\Publish\Core\MVC\Symfony\View\CachableView;
7
use eZ\Publish\Core\MVC\Symfony\View\ContentValueView;
8
use Netgen\InformationCollection\API\InformationCollectionTrait;
9
use Netgen\InformationCollection\API\Value\DataTransfer\AdditionalContent;
10
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
11
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
12
use Symfony\Component\HttpFoundation\Request;
13
14
class CollectInformation implements ContainerAwareInterface
15
{
16
    use InformationCollectionTrait;
17
    use ContainerAwareTrait;
18
19
    /**
20
     * Displays and handles information collection.
21
     *
22
     * @param ContentValueView $view
23
     * @param Request $request
24
     *
25
     * @return ContentValueView
26
     */
27
    public function __invoke(ContentValueView $view, Request $request)
28
    {
29
        $parameters = $this->collectInformation($view, $request, new AdditionalContent());
30
31
        if ($view instanceof BaseView) {
32
            $view->addParameters($parameters);
33
        }
34
35
        if ($view instanceof CachableView) {
36
            $view->setCacheEnabled(false);
37
        }
38
39
        return $view;
40
    }
41
}
42