| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | protected function executeEvent(?string $payload): ?string |
||
| 18 | { |
||
| 19 | if ($payload === null) { |
||
| 20 | throw new \InvalidArgumentException('Empty payload. JSON message expected.'); |
||
| 21 | } |
||
| 22 | $data = \GuzzleHttp\json_decode($payload, true); |
||
| 23 | $result = $this->executeJsonEvent($data); |
||
| 24 | if ($result === null) { |
||
| 25 | return null; |
||
| 26 | } |
||
| 27 | return \GuzzleHttp\json_encode($result); |
||
| 28 | } |
||
| 30 |