Conditions | 4 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.074 |
Changes | 0 |
1 | <?php |
||
48 | 2 | protected function applyResponseTransformer($transformer, ResponseInterface $data) |
|
49 | { |
||
50 | 2 | if ($transformer instanceof ResponseTransformerInterface && $transformer->supports($data)) { |
|
51 | 2 | $transformer->transform($data); |
|
52 | 2 | return; |
|
53 | } |
||
54 | |||
55 | 2 | if ($transformer instanceof \Closure) { |
|
56 | $transformer($data); |
||
57 | } |
||
60 |