Conditions | 4 |
Paths | 3 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function acceptRequest() |
||
30 | { |
||
31 | $body = $this->getWorker()->receive($ctx); |
||
32 | if (empty($body) && empty($ctx)) { |
||
33 | // termination request |
||
34 | return null; |
||
35 | } |
||
36 | |||
37 | if (empty($ctx = json_decode($ctx, true))) { |
||
38 | // invalid context |
||
39 | return null; |
||
40 | } |
||
41 | |||
42 | return ['ctx' => $ctx, 'body' => $body]; |
||
43 | } |
||
44 | |||
67 |