| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2.1481 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 42 | 4 | public function handle(ServerWasPoked $event) |
|
| 43 | { |
||
| 44 | 4 | $channel = config('broadcasting.connections.pusher.channel'); |
|
| 45 | 4 | $device = $event->getDevice(); |
|
| 46 | |||
| 47 | 4 | if ($device->isPublic()) { |
|
| 48 | 3 | $this->pusher->trigger($channel, 'ServerWasPoked', [ |
|
| 49 | 3 | 'device' => $this->transformer->transform($device), |
|
| 50 | ]); |
||
| 51 | } else { |
||
| 52 | 1 | $channel = $channel.'-'.$device->group; |
|
| 53 | |||
| 54 | 1 | $this->pusher->trigger($channel, 'ServerWasPoked', [ |
|
| 55 | 1 | 'device' => $this->transformer->transform($device), |
|
| 56 | ]); |
||
| 57 | } |
||
| 58 | 4 | } |
|
| 59 | } |
||
| 60 |