Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
17 | 6 | public function handleCallback(ServerRequestInterface $request) |
|
18 | { |
||
19 | 6 | $body = $request->getParsedBody(); |
|
20 | 6 | $body = is_array($body) ? $body : []; |
|
21 | 6 | if (isset($body['xml'])) { |
|
22 | 3 | $callback = new XmlCallback($request); |
|
23 | } else { |
||
24 | 3 | $callback = new FormCallback($request); |
|
25 | } |
||
26 | |||
27 | 6 | return $callback; |
|
28 | } |
||
29 | } |
||
30 |