Completed
Push — master ( 79ef00...d11daa )
by Alexandru
01:30 queued 11s
created

RestartWebSocketServer::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace BeyondCode\LaravelWebSockets\Console;
4
5
use Illuminate\Console\Command;
6
use Illuminate\Support\Facades\Cache;
7
use Illuminate\Support\InteractsWithTime;
8
9
class RestartWebSocketServer extends Command
10
{
11
    use InteractsWithTime;
12
13
    protected $signature = 'websockets:restart';
14
15
    protected $description = 'Restart the Laravel WebSocket Server';
16
17
    public function handle()
18
    {
19
        Cache::forever('beyondcode:websockets:restart', $this->currentTime());
20
21
        $this->info('Broadcasting WebSocket server restart signal.');
22
    }
23
}
24