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::__invoke()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.7998
c 0
b 0
f 0
cc 3
nc 4
nop 2
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