Lines
100.00%
4 / 4
Functions and Methods
100.00%
1 / 1
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| WarehouseSubject | 100.00% | 4 / 4 | 100.00% | 1 / 1 | 1 | 100.00% | 1 / 1 | |||
| readResponse | 100.00% | 4 / 4 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | /** | |
| 4 | * @package zmsstatistic | |
| 5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG | |
| 6 | **/ | |
| 7 | ||
| 8 | namespace BO\Zmsstatistic\Download; | |
| 9 | ||
| 10 | use BO\Zmsstatistic\Helper\Download; | |
| 11 | ||
| 12 | class WarehouseSubject extends Base | |
| 13 | { | |
| 14 | /** | |
| 15 | * @SuppressWarnings(Param) | |
| 16 | * @return \Psr\Http\Message\ResponseInterface | |
| 17 | */ | |
| 18 | #[\Override] | |
| 19 | public function readResponse( | |
| 20 | \Psr\Http\Message\RequestInterface $request, | |
| 21 | \Psr\Http\Message\ResponseInterface $response, | |
| 22 | array $args | |
| 23 | ): \Psr\Http\Message\ResponseInterface { | |
| 24 | $title = 'raw_statistic_' . $args['subject']; | |
| 25 | $download = (new Download($request))->setSpreadSheet($title); | |
| 26 | ||
| 27 | $this->writeRawReport($args['reports'][0], $download->getSpreadSheet()); | |
| 28 | ||
| 29 | return $download->writeDownload($response); | |
| 30 | } | |
| 31 | } |