FileResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
A getFile() 0 4 1
1
<?php
2
3
namespace AppBundle\Response;
4
5
use AppBundle\Response\Infrastructure\AbstractApiResponse;
6
use Symfony\Component\HttpFoundation\Response;
7
8
/**
9
 * @author Vehsamrak
10
 */
11
class FileResponse extends AbstractApiResponse
12
{
13
14
    /** @var string */
15
    private $filePath;
16
17 1
    public function __construct(string $filePath, int $httpCode = null)
18
    {
19 1
        $this->httpCode = $httpCode ?: Response::HTTP_OK;
20 1
        $this->filePath = $filePath;
21 1
    }
22
23 1
    public function getFile()
24
    {
25 1
        return $this->filePath;
26
    }
27
}
28