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 — master (#33)
by Alessandro
07:48
created

RequestOptions::fromRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 14
nc 1
nop 2
dl 0
loc 18
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Mado\QueryBundle\Objects;
4
5
use Symfony\Component\HttpFoundation\Request;
6
7
class RequestOptions
8
{
9
    private $requestOptions;
10
11
    private function __construct(array $requestOptions)
12
    {
13
        $this->requestOptions = $requestOptions;
14
    }
15
16
    public static function fromRequest(Request $request, $entityAlias)
17
    {
18
        $requestOption = [];
19
20
        $requestOption['_route']       = $request->attributes->get('_route', '');
21
        $requestOption['customer_id']  = $request->attributes->get('customer_id', '');
22
        $requestOption['id']           = $request->attributes->get('id', '');
23
        $requestOption['filters']      = $request->query->get('filtering', []);
24
        $requestOption['orFiltering']    = $request->query->get('filtering_or', []);
25
        $requestOption['sorting ']     = $request->query->get('sorting', []);
26
        $requestOption['printing']     = $request->query->get('printing', []);
27
        $requestOption['rel']          = $request->query->get('rel', '');
28
        $requestOption['page']         = $request->query->get('page', '');
29
        $requestOption['select']       = $request->query->get('select', $entityAlias);
30
        $requestOption['filtering']    = $request->query->get('filtering', '');
31
        $requestOption['limit']        = $request->query->get('limit', '');
32
33
        return new self($requestOption);
34
    }
35
36
    public function asArray() :array
37
    {
38
        return $this->requestOptions;
39
    }
40
41
}