Total Complexity | 4 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | trait ConvertsToResponseTrait { |
||
16 | /** |
||
17 | * Get a Response Service instance. |
||
18 | * |
||
19 | * @return ResponseService |
||
20 | */ |
||
21 | abstract protected function getResponseService(); |
||
22 | |||
23 | /** |
||
24 | * Convert a user returned response to a ResponseInterface instance if possible. |
||
25 | * Return the original value if unsupported. |
||
26 | * |
||
27 | * @param mixed $response |
||
28 | * @return mixed |
||
29 | */ |
||
30 | 4 | protected function toResponse( $response ) { |
|
46 |