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 ( 1ea27c...8ffe82 )
by Jérémy
01:53
created

src/Runner.php (3 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
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...
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
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