Issues (18)

src/Response/AbstractLazyHttpResponse.php (2 issues)

Severity
1
<?php
2
declare(strict_types=1);
3
4
namespace Basster\LazyResponseBundle\Response;
5
6
use Symfony\Component\HttpFoundation\Response;
7
8
/**
9
 * Class AbstractHttpResponse.
10
 */
11
abstract class AbstractLazyHttpResponse implements LazyResponseInterface
12
{
13
    /**
14
     * AbstractLazyHttpResponse constructor.
15
     */
16 7
    public function __construct(protected int $status = Response::HTTP_OK, protected array $headers = [])
0 ignored issues
show
The parameter $status 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

16
    public function __construct(/** @scrutinizer ignore-unused */ protected int $status = Response::HTTP_OK, protected array $headers = [])

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...
The parameter $headers 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

16
    public function __construct(protected int $status = Response::HTTP_OK, /** @scrutinizer ignore-unused */ protected array $headers = [])

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...
17
    {
18 7
    }
19
20 7
    public function getHeaders(): array
21
    {
22 7
        return $this->headers;
23
    }
24
25 7
    public function getStatusCode(): int
26
    {
27 7
        return $this->status;
28
    }
29
}
30