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