| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public static function createForMessage( |
||
| 22 | MessageInterface $message, |
||
| 23 | ConnectionInterface $connection, |
||
| 24 | ChannelManager $channelManager): PusherMessage |
||
| 25 | { |
||
| 26 | $payload = json_decode($message->getPayload()); |
||
| 27 | |||
| 28 | return Str::startsWith($payload->event, 'pusher:') |
||
| 29 | ? new PusherChannelProtocolMessage($payload, $connection, $channelManager) |
||
| 30 | : new PusherClientMessage($payload, $connection, $channelManager); |
||
| 31 | } |
||
| 33 |