Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function run() |
||
19 | { |
||
20 | $token = $this->resolveTokenFromPath($_SERVER['REQUEST_URI'] ?? ''); |
||
21 | if (!$this->isWebhookAuthorized($token)) { |
||
22 | http_response_code(403); |
||
23 | $this->logger->errorNotAuthorized(); |
||
24 | } else { |
||
25 | $json = file_get_contents($this->config->getUpdateStream()); |
||
26 | /** @var Update $update */ |
||
27 | $update = $this->zanzaraMapper->mapJson($json, Update::class); |
||
28 | $this->processUpdate($update); |
||
29 | } |
||
32 |