Total Complexity | 7 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 66.67% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | trait HasResponseTrait |
||
15 | { |
||
16 | use \Nip\Http\Response\ResponseAwareTrait; |
||
17 | |||
18 | protected $responseFactory = null; |
||
19 | protected $responsePayload = null; |
||
20 | |||
21 | /** |
||
22 | * @return Response |
||
23 | */ |
||
24 | 1 | public function newResponse() |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return null |
||
31 | */ |
||
32 | protected function getResponseFactory() |
||
33 | { |
||
34 | if ($this->responseFactory === null) { |
||
35 | $this->responseFactory = new ResponseFactory(); |
||
36 | } |
||
37 | |||
38 | return $this->responseFactory; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return null |
||
43 | */ |
||
44 | 1 | public function payload() |
|
51 | } |
||
52 | |||
53 | /** |
||
54 | * @return ResponsePayload |
||
55 | */ |
||
56 | 1 | protected function generateResponsePayload() |
|
65 |