ReactSocketServer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
c 1
b 0
f 0
dl 0
loc 21
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 4 1
A configure() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\React\Socket;
6
7
use Symfony\Component\Console\Command\Command;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
class ReactSocketServer extends Command
12
{
13
    public const NAME = 'serve:socket:wamp';
14
15
    private $config;
16
17
    public function __construct(array $config)
18
    {
19
        parent::__construct();
20
        $this->config = $config;
21
    }
22
23
    protected function configure(): void
24
    {
25
        $this->setName(self::NAME);
26
    }
27
28
    protected function execute(InputInterface $input, OutputInterface $output)
29
    {
30
        $server = new Server();
31
        $server($this->config);
32
    }
33
}
34