| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function handle(SpikeInterface $message) |
||
| 25 | { |
||
| 26 | $clientId = $message->getHeader('Client-ID'); |
||
| 27 | if (!$clientId || !($client = $this->server->getClients()->findById($clientId))) { |
||
| 28 | $this->getDispatcher()->dispatch(new Event(EventStore::UNAUTHORIZED_CLIENT, $this, [ |
||
| 29 | 'clientId' => $clientId, |
||
| 30 | 'connection' => $this->connection |
||
| 31 | ])); |
||
| 32 | $this->connection->close(); |
||
| 33 | throw new ForbiddenException(); |
||
| 34 | } |
||
| 35 | $this->client = $client; |
||
| 36 | } |
||
| 37 | |||
| 46 | } |