AbstractLazyHttpResponse::getStatusCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
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 7
    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 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