Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0263 |
1 | <?php |
||
36 | 27 | public function getResponse() |
|
37 | { |
||
38 | 27 | if (! is_null($this->response)) { |
|
39 | 24 | return $this->response; |
|
40 | } |
||
41 | |||
42 | 3 | if ($this->getContainer()->has('Psr\Http\Message\ResponseInterface')) { |
|
43 | 3 | $this->response = $this->getContainer()->get('Psr\Http\Message\ResponseInterface'); |
|
44 | 3 | return $this->response; |
|
45 | } |
||
46 | |||
47 | throw new RuntimeException('Unable to determine a response object'); |
||
48 | } |
||
49 | |||
55 |