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.
Completed
Push — master ( b2ee95...1ea27c )
by Jérémy
01:48
created

Runner::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 3
1
<?php
2
3
namespace CapMousse\ReactRestify;
4
5
use React\EventLoop\Factory;
6
use React\Socket\Server as SocketServer;
7
use React\Http\Server as HttpServer;
8
9
class Runner
10
{
11
    private $app;
12
13
    public function __construct($app)
14
    {
15
        $this->app = $app;
16
    }
17
18
    public function listen($port, $host = '127.0.0.1')
0 ignored issues
show
Unused Code introduced by
The parameter $port is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $host is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
    {
20
        $loop = Factory::create();
21
        $this->register($loop);
0 ignored issues
show
Bug introduced by
The call to register() misses a required argument $port.

This check looks for function calls that miss required arguments.

Loading history...
22
        $loop->run();
23
    }
24
    
25
    public function register($loop, $port, $host = '127.0.0.1')
26
    {
27
        $socket = new SocketServer($loop);
28
        $http = new HttpServer($socket);
29
30
        $http->on('request', $this->app);
31
        echo("Server running on {$host}:{$port}\n");
32
33
        $socket->listen($port, $host);
34
    }
35
}
36