RestartWebSocketServer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
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