Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
WarehouseSubject
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 readResponse
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * @package zmsstatistic
5 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
6 **/
7
8namespace BO\Zmsstatistic\Download;
9
10use BO\Zmsstatistic\Helper\Download;
11
12class 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}