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 Setup Failed
Push — master ( c5ade0...e039e4 )
by Gabriel
05:51
created

PsrBridgeTrait::getReasonPhrase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\Http\Response;
4
5
use Psr\Http\Message\StreamInterface;
6
7
/**
8
 * Class PsrBridgeTrait
9
 * Add methods to make Symfony Request compliant with PSR
10
 *
11
 * @package Nip\Http\Response
12
 */
13
trait PsrBridgeTrait
14
{
15
16
17
    /**
18
     * Return an instance with the specified HTTP protocol version.
19
     *
20
     * The version string MUST contain only the HTTP version number (e.g.,
21
     * "1.1", "1.0").
22
     *
23
     * This method MUST be implemented in such a way as to retain the
24
     * immutability of the message, and MUST return an instance that has the
25
     * new protocol version.
26
     *
27
     * @param string $version HTTP protocol version
28
     * @return static
29
     */
30
    public function withProtocolVersion($version)
0 ignored issues
show
Unused Code introduced by
The parameter $version is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
    {
32
    }
33
34
    /**
35
     * Retrieves all message header values.
36
     *
37
     * The keys represent the header name as it will be sent over the wire, and
38
     * each value is an array of strings associated with the header.
39
     *
40
     *     // Represent the headers as a string
41
     *     foreach ($message->getHeaders() as $name => $values) {
42
     *         echo $name . ": " . implode(", ", $values);
43
     *     }
44
     *
45
     *     // Emit headers iteratively:
46
     *     foreach ($message->getHeaders() as $name => $values) {
47
     *         foreach ($values as $value) {
48
     *             header(sprintf('%s: %s', $name, $value), false);
49
     *         }
50
     *     }
51
     *
52
     * While header names are not case-sensitive, getHeaders() will preserve the
53
     * exact case in which headers were originally specified.
54
     *
55
     * @return string[][] Returns an associative array of the message's headers. Each
56
     *     key MUST be a header name, and each value MUST be an array of strings
57
     *     for that header.
58
     */
59
    public function getHeaders()
60
    {
61
    }
62
63
    /**
64
     * Checks if a header exists by the given case-insensitive name.
65
     *
66
     * @param string $name Case-insensitive header field name.
67
     * @return bool Returns true if any header names match the given header
68
     *     name using a case-insensitive string comparison. Returns false if
69
     *     no matching header name is found in the message.
70
     */
71
    public function hasHeader($name)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
72
    {
73
    }
74
75
    /**
76
     * Retrieves a message header value by the given case-insensitive name.
77
     *
78
     * This method returns an array of all the header values of the given
79
     * case-insensitive header name.
80
     *
81
     * If the header does not appear in the message, this method MUST return an
82
     * empty array.
83
     *
84
     * @param string $name Case-insensitive header field name.
85
     * @return string[] An array of string values as provided for the given
86
     *    header. If the header does not appear in the message, this method MUST
87
     *    return an empty array.
88
     */
89
    public function getHeader($name)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
90
    {
91
    }
92
93
    /**
94
     * Retrieves a comma-separated string of the values for a single header.
95
     *
96
     * This method returns all of the header values of the given
97
     * case-insensitive header name as a string concatenated together using
98
     * a comma.
99
     *
100
     * NOTE: Not all header values may be appropriately represented using
101
     * comma concatenation. For such headers, use getHeader() instead
102
     * and supply your own delimiter when concatenating.
103
     *
104
     * If the header does not appear in the message, this method MUST return
105
     * an empty string.
106
     *
107
     * @param string $name Case-insensitive header field name.
108
     * @return string A string of values as provided for the given header
109
     *    concatenated together using a comma. If the header does not appear in
110
     *    the message, this method MUST return an empty string.
111
     */
112
    public function getHeaderLine($name)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
113
    {
114
    }
115
116
    /**
117
     * Return an instance with the provided value replacing the specified header.
118
     *
119
     * While header names are case-insensitive, the casing of the header will
120
     * be preserved by this function, and returned from getHeaders().
121
     *
122
     * This method MUST be implemented in such a way as to retain the
123
     * immutability of the message, and MUST return an instance that has the
124
     * new and/or updated header and value.
125
     *
126
     * @param string $name Case-insensitive header field name.
127
     * @param string|string[] $value Header value(s).
128
     * @return static
129
     * @throws \InvalidArgumentException for invalid header names or values.
130
     */
131
    public function withHeader($name, $value)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
132
    {
133
    }
134
135
    /**
136
     * Return an instance with the specified header appended with the given value.
137
     *
138
     * Existing values for the specified header will be maintained. The new
139
     * value(s) will be appended to the existing list. If the header did not
140
     * exist previously, it will be added.
141
     *
142
     * This method MUST be implemented in such a way as to retain the
143
     * immutability of the message, and MUST return an instance that has the
144
     * new header and/or value.
145
     *
146
     * @param string $name Case-insensitive header field name to add.
147
     * @param string|string[] $value Header value(s).
148
     * @return static
149
     * @throws \InvalidArgumentException for invalid header names or values.
150
     */
151
    public function withAddedHeader($name, $value)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
152
    {
153
    }
154
155
    /**
156
     * Return an instance without the specified header.
157
     *
158
     * Header resolution MUST be done without case-sensitivity.
159
     *
160
     * This method MUST be implemented in such a way as to retain the
161
     * immutability of the message, and MUST return an instance that removes
162
     * the named header.
163
     *
164
     * @param string $name Case-insensitive header field name to remove.
165
     * @return static
166
     */
167
    public function withoutHeader($name)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
168
    {
169
    }
170
171
    /**
172
     * Gets the body of the message.
173
     *
174
     * @return StreamInterface Returns the body as a stream.
175
     */
176
    public function getBody()
177
    {
178
    }
179
180
    /**
181
     * Return an instance with the specified message body.
182
     *
183
     * The body MUST be a StreamInterface object.
184
     *
185
     * This method MUST be implemented in such a way as to retain the
186
     * immutability of the message, and MUST return a new instance that has the
187
     * new body stream.
188
     *
189
     * @param StreamInterface $body Body.
190
     * @return static
191
     * @throws \InvalidArgumentException When the body is not valid.
192
     */
193
    public function withBody(StreamInterface $body)
0 ignored issues
show
Unused Code introduced by
The parameter $body is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
194
    {
195
    }
196
197
    /**
198
     * Return an instance with the specified status code and, optionally, reason phrase.
199
     *
200
     * If no reason phrase is specified, implementations MAY choose to default
201
     * to the RFC 7231 or IANA recommended reason phrase for the response's
202
     * status code.
203
     *
204
     * This method MUST be implemented in such a way as to retain the
205
     * immutability of the message, and MUST return an instance that has the
206
     * updated status and reason phrase.
207
     *
208
     * @link http://tools.ietf.org/html/rfc7231#section-6
209
     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
210
     * @param int $code The 3-digit integer result code to set.
211
     * @param string $reasonPhrase The reason phrase to use with the
212
     *     provided status code; if none is provided, implementations MAY
213
     *     use the defaults as suggested in the HTTP specification.
214
     * @return static
215
     * @throws \InvalidArgumentException For invalid status code arguments.
216
     */
217
    public function withStatus($code, $reasonPhrase = '')
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $reasonPhrase is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
218
    {
219
    }
220
221
    /**
222
     * Gets the response reason phrase associated with the status code.
223
     *
224
     * Because a reason phrase is not a required element in a response
225
     * status line, the reason phrase value MAY be null. Implementations MAY
226
     * choose to return the default RFC 7231 recommended reason phrase (or those
227
     * listed in the IANA HTTP Status Code Registry) for the response's
228
     * status code.
229
     *
230
     * @link http://tools.ietf.org/html/rfc7231#section-6
231
     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
232
     * @return string Reason phrase; must return an empty string if none present.
233
     */
234
    public function getReasonPhrase()
235
    {
236
    }
237
}
238