LocationApiResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 18
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getLocation() 0 4 1
1
<?php
2
3
namespace AppBundle\Response;
4
5
use AppBundle\Response\Infrastructure\HttpLocationInterface;
6
7
/**
8
 * Empty API response with location.
9
 * Returns only HTTP code with empty body and location header
10
 * @author Vehsamrak
11
 */
12
class LocationApiResponse extends EmptyApiResponse implements HttpLocationInterface
13
{
14
15
    /** @var string */
16
    private $location;
17
18
    /** {@inheritDoc} */
19 6
    public function __construct(int $httpCode, string $location)
20
    {
21 6
        parent::__construct($httpCode);
22 6
        $this->location = $location;
23 6
    }
24
25 6
    public function getLocation(): string
26
    {
27 6
        return $this->location;
28
    }
29
}
30