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.
Test Failed
Pull Request — 2.2 (#165)
by Simone
03:19 queued 30s
created

Router::createRouter()   A

Complexity

Conditions 4
Paths 8

Size

Total Lines 25
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 25
rs 9.7666
c 0
b 0
f 0
cc 4
nc 8
nop 2
1
<?php
2
3
namespace Mado\QueryBundle\Services;
4
5
use Hateoas\Configuration\Route;
6
use Mado\QueryBundle\Queries\QueryBuilderOptions;
7
8
class Router
9
{
10
    public function createRouter(QueryBuilderOptions $queryOptions, $routeName) :Route
11
    {
12
        $params = [];
13
        $routeParams = [];
14
15
        if (null != $queryOptions->get('_route_params')) {
16
            $routeParams = array_keys($queryOptions->get('_route_params'));
17
        }
18
19
        $list = array_merge([
20
            'filtering',
21
            'limit',
22
            'page',
23
            'sorting',
24
        ], $routeParams);
25
26
        foreach ($list as $itemKey => $itemValue) {
27
            $params[$itemValue] = $queryOptions->get($itemValue);
28
        }
29
30
        if (!isset($routeName)) {
31
            $routeName = $queryOptions->get('_route');
32
        }
33
34
        return new Route($routeName, $params);
35
    }
36
}