GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

WebsocketShell   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 36
rs 10
c 0
b 0
f 0
ccs 0
cts 16
cp 0
wmc 2
lcom 1
cbo 5

2 Methods

Rating   Name   Duplication   Size   Complexity  
A start() 0 6 1
A getOptionParser() 0 16 1
1
<?php
2
3
namespace WyriHaximus\Ratchet\Shell;
4
5
use Cake\Console\Shell;
6
use Cake\Core\Configure;
7
use Cake\Event\EventManager;
8
use React\EventLoop\LoopInterface;
9
use WyriHaximus\Ratchet\Event\ConstructEvent;
10
11
class WebsocketShell extends Shell
12
{
13
    /**
14
     * @var LoopInterface
15
     */
16
    protected $loop;
17
18
    public function start()
19
    {
20
        $this->loop = \WyriHaximus\Ratchet\loopResolver();
21
        EventManager::instance()->dispatch(ConstructEvent::create($this->loop, EventManager::instance()));
22
        $this->loop->run();
23
    }
24
25
    /**
26
     * Set options for this console
27
     *
28
     * @return \Cake\Console\ConsoleOptionParser
29
     */
30
    public function getOptionParser()
31
    {
32
        return parent::getOptionParser()->addSubcommand(
0 ignored issues
show
Deprecated Code introduced by
The method Cake\Console\ConsoleOptionParser::description() has been deprecated with message: 3.4.0 Use setDescription()/getDescription() instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
33
            'start',
34
            [
35
                'help' => __('Starts and runs both the websocket service')
36
            ]
37
        )->description(__('Ratchet Websocket service.'))->addOption(
38
            'verbose',
39
            [
40
                'help' => 'Enable verbose output',
41
                'short' => 'v',
42
                'boolean' => true
43
            ]
44
        );
45
    }
46
}
47