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::getOptionParser()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 16
ccs 0
cts 11
cp 0
crap 2
rs 9.7333
c 0
b 0
f 0
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