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