Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function handle(ServerRequestInterface $request): ResponseInterface |
||
15 | { |
||
16 | $path = DownloadFile::COUNTER_PATH; |
||
17 | if (!is_readable($path)) { |
||
18 | return $this->createError('File not found on disk, or not readable'); |
||
19 | } |
||
20 | |||
21 | $response = new TextResponse(file_get_contents($path)); |
||
22 | |||
23 | return $response; |
||
24 | } |
||
26 |