Test Failed
Pull Request — master (#4)
by Ole
01:53
created

AbstractLazyHttpResponse::getStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
ccs 0
cts 5
cp 0
crap 2
rs 10
c 1
b 0
f 0
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
    public function __construct(protected int $status = Response::HTTP_OK, protected array $headers = [])
0 ignored issues
show
Unused Code introduced by
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...
Unused Code introduced by
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
    }
19
20
    public function getHeaders(): array
21
    {
22
        return $this->headers;
23
    }
24
25
    public function getStatusCode(): int
26 7
    {
27
        return $this->status;
28 7
    }
29
}
30