Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function get(string $date, string $type = 'ALL', array $optional = []) |
||
28 | { |
||
29 | $params = [ |
||
30 | 'bill_date' => $date, |
||
31 | 'bill_type' => $type, |
||
32 | ] + $optional; |
||
33 | |||
34 | $response = $this->requestRaw('pay/downloadbill', $params); |
||
35 | |||
36 | if (strpos($response->getBody()->getContents(), '<xml>') === 0) { |
||
37 | return $this->resolveResponse($response, $this->app['config']->get('response_type', 'array')); |
||
38 | } |
||
39 | |||
40 | return StreamResponse::buildFromPsrResponse($response); |
||
41 | } |
||
42 | } |
||
43 |