| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function createResponse($statusCode = 200, $reasonPhrase = null, array $header = [], $body = null, $protocolVersion = '1.1') |
||
| 22 | { |
||
| 23 | $body = null === $body ? 'php://memory' : $body; |
||
| 24 | $response = new Response($body, $statusCode, $header); |
||
| 25 | $response = $response->withProtocolVersion($protocolVersion); |
||
| 26 | if (\is_string($reasonPhrase)) { |
||
| 27 | $response = $response->withStatus($statusCode, $reasonPhrase); |
||
| 28 | } |
||
| 29 | |||
| 30 | return $response; |
||
| 31 | } |
||
| 32 | } |
||
| 33 |