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

FileResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 17
rs 10
c 1
b 0
f 0

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
    public function __construct(string $filePath, int $httpCode = null)
18
    {
19
        $this->httpCode = $httpCode ?: Response::HTTP_OK;
20
        $this->filePath = $filePath;
21
    }
22
23
    public function getFile()
24
    {
25
        return $this->filePath;
26
    }
27
}
28