Completed
Push — master ( d129c8...00172d )
by Gabriel
03:56
created

PsrBridgeTrait   A

Complexity

Total Complexity 27

Size/Duplication

Total Lines 486
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 486
ccs 0
cts 53
cp 0
rs 10
wmc 27

27 Methods

Rating   Name   Duplication   Size   Complexity  
A withAddedHeader() 0 2 1
A getRequestTarget() 0 2 1
A getServerParams() 0 2 1
A getQueryParams() 0 2 1
A getHeaderLine() 0 2 1
A withoutAttribute() 0 2 1
A getAttribute() 0 2 1
A withUri() 0 2 1
A withQueryParams() 0 2 1
A getCookieParams() 0 2 1
A withRequestTarget() 0 2 1
A getParsedBody() 0 2 1
A getHeader() 0 3 1
A withHeader() 0 2 1
A withCookieParams() 0 2 1
A withMethod() 0 2 1
A withoutHeader() 0 2 1
A withAttribute() 0 2 1
A getBody() 0 2 1
A getUploadedFiles() 0 2 1
A withProtocolVersion() 0 2 1
A withBody() 0 2 1
A getProtocolVersion() 0 2 1
A withUploadedFiles() 0 2 1
A withParsedBody() 0 2 1
A getAttributes() 0 2 1
A getHeaders() 0 3 1
1
<?php
2
3
namespace Nip\Http\Request\Traits;
4
5
use Psr\Http\Message\StreamInterface;
6
use Psr\Http\Message\UriInterface;
7
8
/**
9
 * Class PsrBridgeTrait
10
 * Add methods to make Symfony Request compliant with PSR
11
 *
12
 * @package Nip\Http\Request\Traits
13
 */
14
trait PsrBridgeTrait
15
{
16
    /**
17
     * Retrieves the HTTP protocol version as a string.
18
     *
19
     * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
20
     *
21
     * @return string HTTP protocol version.
22
     */
23
    public function getProtocolVersion()
24
    {
25
    }
26
27
    /**
28
     * Return an instance with the specified HTTP protocol version.
29
     *
30
     * The version string MUST contain only the HTTP version number (e.g.,
31
     * "1.1", "1.0").
32
     *
33
     * This method MUST be implemented in such a way as to retain the
34
     * immutability of the message, and MUST return an instance that has the
35
     * new protocol version.
36
     *
37
     * @param string $version HTTP protocol version
38
     * @return static
39
     */
40
    public function withProtocolVersion($version)
0 ignored issues
show
Unused Code introduced by
The parameter $version is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

40
    public function withProtocolVersion(/** @scrutinizer ignore-unused */ $version)

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

Loading history...
41
    {
42
    }
43
44
    /**
45
     * Retrieves all message header values.
46
     *
47
     * The keys represent the header name as it will be sent over the wire, and
48
     * each value is an array of strings associated with the header.
49
     *
50
     *     // Represent the headers as a string
51
     *     foreach ($message->getHeaders() as $name => $values) {
52
     *         echo $name . ": " . implode(", ", $values);
53
     *     }
54
     *
55
     *     // Emit headers iteratively:
56
     *     foreach ($message->getHeaders() as $name => $values) {
57
     *         foreach ($values as $value) {
58
     *             header(sprintf('%s: %s', $name, $value), false);
59
     *         }
60
     *     }
61
     *
62
     * While header names are not case-sensitive, getHeaders() will preserve the
63
     * exact case in which headers were originally specified.
64
     *
65
     * @return string[][] Returns an associative array of the message's headers. Each
66
     *     key MUST be a header name, and each value MUST be an array of strings
67
     *     for that header.
68
     */
69
    public function getHeaders()
70
    {
71
        return $this->headers;
72
    }
73
74
    /**
75
     * Retrieves a message header value by the given case-insensitive name.
76
     *
77
     * This method returns an array of all the header values of the given
78
     * case-insensitive header name.
79
     *
80
     * If the header does not appear in the message, this method MUST return an
81
     * empty array.
82
     *
83
     * @param string $name Case-insensitive header field name.
84
     * @return string[] An array of string values as provided for the given
85
     *    header. If the header does not appear in the message, this method MUST
86
     *    return an empty array.
87
     */
88
    public function getHeader($name)
89
    {
90
        return $this->header($name);
0 ignored issues
show
Bug introduced by
It seems like header() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

90
        return $this->/** @scrutinizer ignore-call */ header($name);
Loading history...
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. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

112
    public function getHeaderLine(/** @scrutinizer ignore-unused */ $name)

This check looks for 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 specified header appended with the given value.
118
     *
119
     * Existing values for the specified header will be maintained. The new
120
     * value(s) will be appended to the existing list. If the header did not
121
     * exist previously, it will be added.
122
     *
123
     * This method MUST be implemented in such a way as to retain the
124
     * immutability of the message, and MUST return an instance that has the
125
     * new header and/or value.
126
     *
127
     * @param string $name Case-insensitive header field name to add.
128
     * @param string|string[] $value Header value(s).
129
     * @return static
130
     * @throws \InvalidArgumentException for invalid header names or values.
131
     */
132
    public function withAddedHeader($name, $value)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

132
    public function withAddedHeader(/** @scrutinizer ignore-unused */ $name, $value)

This check looks for 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. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

132
    public function withAddedHeader($name, /** @scrutinizer ignore-unused */ $value)

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

Loading history...
133
    {
134
    }
135
136
    /**
137
     * Gets the body of the message.
138
     *
139
     * @return StreamInterface Returns the body as a stream.
140
     */
141
    public function getBody()
142
    {
143
    }
144
145
    /**
146
     * Return an instance with the specified message body.
147
     *
148
     * The body MUST be a StreamInterface object.
149
     *
150
     * This method MUST be implemented in such a way as to retain the
151
     * immutability of the message, and MUST return a new instance that has the
152
     * new body stream.
153
     *
154
     * @param StreamInterface $body Body.
155
     * @return static
156
     * @throws \InvalidArgumentException When the body is not valid.
157
     */
158
    public function withBody(StreamInterface $body)
0 ignored issues
show
Unused Code introduced by
The parameter $body is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

158
    public function withBody(/** @scrutinizer ignore-unused */ StreamInterface $body)

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

Loading history...
159
    {
160
    }
161
162
    /**
163
     * Retrieves the message's request target.
164
     *
165
     * Retrieves the message's request-target either as it will appear (for
166
     * clients), as it appeared at request (for servers), or as it was
167
     * specified for the instance (see withRequestTarget()).
168
     *
169
     * In most cases, this will be the origin-form of the composed URI,
170
     * unless a value was provided to the concrete implementation (see
171
     * withRequestTarget() below).
172
     *
173
     * If no URI is available, and no request-target has been specifically
174
     * provided, this method MUST return the string "/".
175
     *
176
     * @return string
177
     */
178
    public function getRequestTarget()
179
    {
180
    }
181
182
    /**
183
     * Return an instance with the specific request-target.
184
     *
185
     * If the request needs a non-origin-form request-target — e.g., for
186
     * specifying an absolute-form, authority-form, or asterisk-form —
187
     * this method may be used to create an instance with the specified
188
     * request-target, verbatim.
189
     *
190
     * This method MUST be implemented in such a way as to retain the
191
     * immutability of the message, and MUST return an instance that has the
192
     * changed request target.
193
     *
194
     * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
195
     *     request-target forms allowed in request messages)
196
     * @param mixed $requestTarget
197
     * @return static
198
     */
199
    public function withRequestTarget($requestTarget)
0 ignored issues
show
Unused Code introduced by
The parameter $requestTarget is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

199
    public function withRequestTarget(/** @scrutinizer ignore-unused */ $requestTarget)

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

Loading history...
200
    {
201
    }
202
203
    /**
204
     * Return an instance with the provided HTTP method.
205
     *
206
     * While HTTP method names are typically all uppercase characters, HTTP
207
     * method names are case-sensitive and thus implementations SHOULD NOT
208
     * modify the given string.
209
     *
210
     * This method MUST be implemented in such a way as to retain the
211
     * immutability of the message, and MUST return an instance that has the
212
     * changed request method.
213
     *
214
     * @param string $method Case-sensitive method.
215
     * @return static
216
     * @throws \InvalidArgumentException for invalid HTTP methods.
217
     */
218
    public function withMethod($method)
0 ignored issues
show
Unused Code introduced by
The parameter $method is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

218
    public function withMethod(/** @scrutinizer ignore-unused */ $method)

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

Loading history...
219
    {
220
    }
221
222
    /**
223
     * @param UriInterface $uri
224
     * @param bool $preserveHost
225
     * @return static
226
     */
227
    public function withUri(UriInterface $uri, $preserveHost = false)
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

227
    public function withUri(/** @scrutinizer ignore-unused */ UriInterface $uri, $preserveHost = false)

This check looks for 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 $preserveHost is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

227
    public function withUri(UriInterface $uri, /** @scrutinizer ignore-unused */ $preserveHost = false)

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

Loading history...
228
    {
229
    }
230
231
    /**
232
     * @param $name
233
     * @return static
234
     */
235
    public function withoutHeader($name)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

235
    public function withoutHeader(/** @scrutinizer ignore-unused */ $name)

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

Loading history...
236
    {
237
    }
238
239
    /**
240
     * Return an instance with the provided value replacing the specified header.
241
     *
242
     * While header names are case-insensitive, the casing of the header will
243
     * be preserved by this function, and returned from getHeaders().
244
     *
245
     * This method MUST be implemented in such a way as to retain the
246
     * immutability of the message, and MUST return an instance that has the
247
     * new and/or updated header and value.
248
     *
249
     * @param string $name Case-insensitive header field name.
250
     * @param string|string[] $value Header value(s).
251
     * @return static
252
     * @throws \InvalidArgumentException for invalid header names or values.
253
     */
254
    public function withHeader($name, $value)
0 ignored issues
show
Unused Code introduced by
The parameter $value is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

254
    public function withHeader($name, /** @scrutinizer ignore-unused */ $value)

This check looks for 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 $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

254
    public function withHeader(/** @scrutinizer ignore-unused */ $name, $value)

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

Loading history...
255
    {
256
    }
257
258
    /**
259
     * Retrieve server parameters.
260
     *
261
     * Retrieves data related to the incoming request environment,
262
     * typically derived from PHP's $_SERVER superglobal. The data IS NOT
263
     * REQUIRED to originate from $_SERVER.
264
     *
265
     * @return array
266
     */
267
    public function getServerParams()
268
    {
269
    }
270
271
    /**
272
     * Retrieve cookies.
273
     *
274
     * Retrieves cookies sent by the client to the server.
275
     *
276
     * The data MUST be compatible with the structure of the $_COOKIE
277
     * superglobal.
278
     *
279
     * @return array
280
     */
281
    public function getCookieParams()
282
    {
283
    }
284
285
    /**
286
     * Return an instance with the specified cookies.
287
     *
288
     * The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST
289
     * be compatible with the structure of $_COOKIE. Typically, this data will
290
     * be injected at instantiation.
291
     *
292
     * This method MUST NOT update the related Cookie header of the request
293
     * instance, nor related values in the server params.
294
     *
295
     * This method MUST be implemented in such a way as to retain the
296
     * immutability of the message, and MUST return an instance that has the
297
     * updated cookie values.
298
     *
299
     * @param array $cookies Array of key/value pairs representing cookies.
300
     * @return static
301
     */
302
    public function withCookieParams(array $cookies)
0 ignored issues
show
Unused Code introduced by
The parameter $cookies is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

302
    public function withCookieParams(/** @scrutinizer ignore-unused */ array $cookies)

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

Loading history...
303
    {
304
    }
305
306
    /**
307
     * Retrieve query string arguments.
308
     *
309
     * Retrieves the deserialized query string arguments, if any.
310
     *
311
     * Note: the query params might not be in sync with the URI or server
312
     * params. If you need to ensure you are only getting the original
313
     * values, you may need to parse the query string from `getUri()->getQuery()`
314
     * or from the `QUERY_STRING` server param.
315
     *
316
     * @return array
317
     */
318
    public function getQueryParams()
319
    {
320
    }
321
322
    /**
323
     * Return an instance with the specified query string arguments.
324
     *
325
     * These values SHOULD remain immutable over the course of the incoming
326
     * request. They MAY be injected during instantiation, such as from PHP's
327
     * $_GET superglobal, or MAY be derived from some other value such as the
328
     * URI. In cases where the arguments are parsed from the URI, the data
329
     * MUST be compatible with what PHP's parse_str() would return for
330
     * purposes of how duplicate query parameters are handled, and how nested
331
     * sets are handled.
332
     *
333
     * Setting query string arguments MUST NOT change the URI stored by the
334
     * request, nor the values in the server params.
335
     *
336
     * This method MUST be implemented in such a way as to retain the
337
     * immutability of the message, and MUST return an instance that has the
338
     * updated query string arguments.
339
     *
340
     * @param array $query Array of query string arguments, typically from
341
     *     $_GET.
342
     * @return static
343
     */
344
    public function withQueryParams(array $query)
0 ignored issues
show
Unused Code introduced by
The parameter $query is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

344
    public function withQueryParams(/** @scrutinizer ignore-unused */ array $query)

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

Loading history...
345
    {
346
    }
347
348
349
    /**
350
     * Retrieve normalized file upload data.
351
     *
352
     * This method returns upload metadata in a normalized tree, with each leaf
353
     * an instance of Psr\Http\Message\UploadedFileInterface.
354
     *
355
     * These values MAY be prepared from $_FILES or the message body during
356
     * instantiation, or MAY be injected via withUploadedFiles().
357
     *
358
     * @return array An array tree of UploadedFileInterface instances; an empty
359
     *     array MUST be returned if no data is present.
360
     */
361
    public function getUploadedFiles()
362
    {
363
    }
364
365
    /**
366
     * Create a new instance with the specified uploaded files.
367
     *
368
     * This method MUST be implemented in such a way as to retain the
369
     * immutability of the message, and MUST return an instance that has the
370
     * updated body parameters.
371
     *
372
     * @param array $uploadedFiles An array tree of UploadedFileInterface instances.
373
     * @return static
374
     * @throws \InvalidArgumentException if an invalid structure is provided.
375
     */
376
    public function withUploadedFiles(array $uploadedFiles)
0 ignored issues
show
Unused Code introduced by
The parameter $uploadedFiles is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

376
    public function withUploadedFiles(/** @scrutinizer ignore-unused */ array $uploadedFiles)

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

Loading history...
377
    {
378
    }
379
380
    /**
381
     * Retrieve any parameters provided in the request body.
382
     *
383
     * If the request Content-Type is either application/x-www-form-urlencoded
384
     * or multipart/form-data, and the request method is POST, this method MUST
385
     * return the contents of $_POST.
386
     *
387
     * Otherwise, this method may return any results of deserializing
388
     * the request body content; as parsing returns structured content, the
389
     * potential types MUST be arrays or objects only. A null value indicates
390
     * the absence of body content.
391
     *
392
     * @return null|array|object The deserialized body parameters, if any.
393
     *     These will typically be an array or object.
394
     */
395
    public function getParsedBody()
396
    {
397
    }
398
399
    /**
400
     * Return an instance with the specified body parameters.
401
     *
402
     * These MAY be injected during instantiation.
403
     *
404
     * If the request Content-Type is either application/x-www-form-urlencoded
405
     * or multipart/form-data, and the request method is POST, use this method
406
     * ONLY to inject the contents of $_POST.
407
     *
408
     * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of
409
     * deserializing the request body content. Deserialization/parsing returns
410
     * structured data, and, as such, this method ONLY accepts arrays or objects,
411
     * or a null value if nothing was available to parse.
412
     *
413
     * As an example, if content negotiation determines that the request data
414
     * is a JSON payload, this method could be used to create a request
415
     * instance with the deserialized parameters.
416
     *
417
     * This method MUST be implemented in such a way as to retain the
418
     * immutability of the message, and MUST return an instance that has the
419
     * updated body parameters.
420
     *
421
     * @param null|array|object $data The deserialized body data. This will
422
     *     typically be in an array or object.
423
     * @return static
424
     * @throws \InvalidArgumentException if an unsupported argument type is
425
     *     provided.
426
     */
427
    public function withParsedBody($data)
0 ignored issues
show
Unused Code introduced by
The parameter $data is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

427
    public function withParsedBody(/** @scrutinizer ignore-unused */ $data)

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

Loading history...
428
    {
429
    }
430
431
    /**
432
     * Retrieve attributes derived from the request.
433
     *
434
     * The request "attributes" may be used to allow injection of any
435
     * parameters derived from the request: e.g., the results of path
436
     * match operations; the results of decrypting cookies; the results of
437
     * deserializing non-form-encoded message bodies; etc. Attributes
438
     * will be application and request specific, and CAN be mutable.
439
     *
440
     * @return array Attributes derived from the request.
441
     */
442
    public function getAttributes()
443
    {
444
    }
445
446
    /**
447
     * Retrieve a single derived request attribute.
448
     *
449
     * Retrieves a single derived request attribute as described in
450
     * getAttributes(). If the attribute has not been previously set, returns
451
     * the default value as provided.
452
     *
453
     * This method obviates the need for a hasAttribute() method, as it allows
454
     * specifying a default value to return if the attribute is not found.
455
     *
456
     * @see getAttributes()
457
     * @param string $name The attribute name.
458
     * @param mixed $default Default value to return if the attribute does not exist.
459
     * @return mixed
460
     */
461
    public function getAttribute($name, $default = null)
0 ignored issues
show
Unused Code introduced by
The parameter $default is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

461
    public function getAttribute($name, /** @scrutinizer ignore-unused */ $default = null)

This check looks for 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 $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

461
    public function getAttribute(/** @scrutinizer ignore-unused */ $name, $default = null)

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

Loading history...
462
    {
463
    }
464
465
    /**
466
     * Return an instance with the specified derived request attribute.
467
     *
468
     * This method allows setting a single derived request attribute as
469
     * described in getAttributes().
470
     *
471
     * This method MUST be implemented in such a way as to retain the
472
     * immutability of the message, and MUST return an instance that has the
473
     * updated attribute.
474
     *
475
     * @see getAttributes()
476
     * @param string $name The attribute name.
477
     * @param mixed $value The value of the attribute.
478
     * @return static
479
     */
480
    public function withAttribute($name, $value)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

480
    public function withAttribute(/** @scrutinizer ignore-unused */ $name, $value)

This check looks for 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. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

480
    public function withAttribute($name, /** @scrutinizer ignore-unused */ $value)

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

Loading history...
481
    {
482
    }
483
484
    /**
485
     * Return an instance that removes the specified derived request attribute.
486
     *
487
     * This method allows removing a single derived request attribute as
488
     * described in getAttributes().
489
     *
490
     * This method MUST be implemented in such a way as to retain the
491
     * immutability of the message, and MUST return an instance that removes
492
     * the attribute.
493
     *
494
     * @see getAttributes()
495
     * @param string $name The attribute name.
496
     * @return static
497
     */
498
    public function withoutAttribute($name)
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

498
    public function withoutAttribute(/** @scrutinizer ignore-unused */ $name)

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

Loading history...
499
    {
500
    }
501
}
502