Test Failed
Push — master ( 9e6cf9...d006e3 )
by Petr
04:08
created

LocationApiResponse::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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
    public function __construct(int $httpCode, string $location)
20
    {
21
        parent::__construct($httpCode);
22
        $this->location = $location;
23
    }
24
25
    public function getLocation(): string
26
    {
27
        return $this->location;
28
    }
29
}
30