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