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
Push — master ( 5cefd1...492078 )
by Anton
04:08
created

ServerRequest::getQueryParams()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace RingCentral\Psr7;
4
5
use Psr\Http\Message\ServerRequestInterface;
6
use RingCentral\Psr7\Request;
7
8
/**
9
 * PSR-7 server-side request implementation.
10
 */
11
class ServerRequest extends Request implements ServerRequestInterface
12
{
13
    private $attributes = array();
14
15
    private $serverParams = array();
16
    private $fileParams = array();
17
    private $cookies = array();
18
    private $queryParams = array();
19
    private $parsedBody = null;
20
21
    /**
22
     * @param null|string $method HTTP method for the request.
23
     * @param null|string|UriInterface $uri URI for the request.
0 ignored issues
show
Bug introduced by
The type RingCentral\Psr7\UriInterface 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...
24
     * @param array $headers Headers for the message.
25
     * @param string|resource|StreamInterface $body Message body.
0 ignored issues
show
Bug introduced by
The type RingCentral\Psr7\StreamInterface 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...
26
     * @param string $protocolVersion HTTP protocol version.
27
     * @param array $serverParams Server params of the request.
28
     *
29
     * @throws InvalidArgumentException for an invalid URI
30
     */
31
    public function __construct(
32
        $method,
33
        $uri,
34
        array $headers = array(),
35
        $body = null,
36
        $protocolVersion = '1.1',
37
        $serverParams = array()
38
    ) {
39
        parent::__construct($method, $uri, $headers, $body, $protocolVersion);
40
        $this->serverParams = $serverParams;
41
    }
42
43
    public function getServerParams()
44
    {
45
        return $this->serverParams;
46
    }
47
48
    public function getCookieParams()
49
    {
50
        return $this->cookies;
51
    }
52
53
    public function withCookieParams(array $cookies)
54
    {
55
        $new = clone $this;
56
        $new->cookies = $cookies;
57
        return $new;
58
    }
59
60
    public function getQueryParams()
61
    {
62
        return $this->queryParams;
63
    }
64
65
    public function withQueryParams(array $query)
66
    {
67
        $new = clone $this;
68
        $new->queryParams = $query;
69
        return $new;
70
    }
71
72
    public function getUploadedFiles()
73
    {
74
        return $this->fileParams;
75
    }
76
77
    public function withUploadedFiles(array $uploadedFiles)
78
    {
79
        $new = clone $this;
80
        $new->fileParams = $uploadedFiles;
81
        return $new;
82
    }
83
84
    public function getParsedBody()
85
    {
86
        return $this->parsedBody;
87
    }
88
89
    public function withParsedBody($data)
90
    {
91
        $new = clone $this;
92
        $new->parsedBody = $data;
93
        return $new;
94
    }
95
96
    public function getAttributes()
97
    {
98
        return $this->attributes;
99
    }
100
101
    public function getAttribute($name, $default = null)
102
    {
103
        if (!array_key_exists($name, $this->attributes)) {
104
            return $default;
105
        }
106
        return $this->attributes[$name];
107
    }
108
109
    public function withAttribute($name, $value)
110
    {
111
        $new = clone $this;
112
        $new->attributes[$name] = $value;
113
        return $new;
114
    }
115
116
    public function withoutAttribute($name)
117
    {
118
        $new = clone $this;
119
        unset($new->attributes[$name]);
120
        return $new;
121
    }
122
}
123