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
Pull Request — master (#61)
by Simone
02:28
created

ConfigProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getRequest() 0 3 1
A __construct() 0 6 1
A getUser() 0 3 1
1
<?php
2
3
namespace Mado\QueryBundle\Services;
4
5
use Symfony\Component\HttpFoundation\RequestStack;
6
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Securi...en\Storage\TokenStorage was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Mado\QueryBundle\Component\ConfigProvider as ConfigProviderInterface;
8
9
class ConfigProvider implements ConfigProviderInterface
10
{
11
    private $user;
12
13
    private $request;
14
15
    public function __construct(
16
        RequestStack $requestStack,
17
        TokenStorage $tokenStorage
18
    ) {
19
        $this->user    = $tokenStorage->getToken()->getUser();
20
        $this->request = $requestStack->getCurrentRequest();
21
    }
22
23
    public function getUser()
24
    {
25
        return $this->user;
26
    }
27
28
    public function getRequest()
29
    {
30
        return $this->request;
31
    }
32
}
33