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 ( 9ee3c2...6cf3d3 )
by Sergey
05:55
created

Request::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
/*
3
 * This file is part of the reva2/jsonapi.
4
 *
5
 * (c) Sergey Revenko <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Reva2\JsonApi\Http;
12
13
use Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface;
14
use Reva2\JsonApi\Contracts\Http\RequestInterface;
15
use Reva2\JsonApi\Contracts\Services\EnvironmentInterface;
16
17
/**
18
 * JSON API request
19
 *
20
 * @package Reva2\JsonApi\Http
21
 * @author Sergey Revenko <[email protected]>
22
 */
23
class Request implements RequestInterface
24
{
25
    /**
26
     * @var EnvironmentInterface
27
     */
28
    protected $environment;
29
30
    /**
31
     * @var EncodingParametersInterface
32
     */
33
    protected $query;
34
35
    /**
36
     * @var mixed|null
37
     */
38
    protected $body;
39
40
    /**
41
     * Constructor
42
     *
43
     * @param EnvironmentInterface $environment
44
     */
45 3
    public function __construct(EnvironmentInterface $environment)
46
    {
47 3
        $this->environment = $environment;
48 3
    }
49
50
    /**
51
     * @inheritdoc
52
     */
53 3
    public function getEnvironment()
54
    {
55 3
        return $this->environment;
56
    }
57
58
    /**
59
     * @inheritdoc
60
     */
61 3
    public function getQuery()
62
    {
63 3
        return $this->query;
64
    }
65
66
    /**
67
     * @param EncodingParametersInterface|null $query
68
     * @return $this
69
     */
70 3
    public function setQuery(EncodingParametersInterface $query = null)
71
    {
72 3
        $this->query = $query;
73
74 3
        return $this;
75
    }
76
77
    /**
78
     * @inheritdoc
79
     */
80 2
    public function getBody()
81
    {
82 2
        return $this->body;
83
    }
84
85
    /**
86
     * @param mixed|null $body
87
     * @return $this
88
     */
89 3
    public function setBody($body = null)
90
    {
91 3
        $this->body = $body;
92
93 3
        return $this;
94
    }
95
}
96