Passed
Pull Request — master (#11)
by Sergey
09:39
created

ServerProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 23
ccs 0
cts 7
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A boot() 0 3 1
1
<?php
2
3
namespace Asiries335\redisSteamPhp;
4
5
use Asiries335\redisSteamPhp\Listeners\Manager\ListenerEventManagerInterface;
6
use Asiries335\redisSteamPhp\Server\ServerInterface;
7
8
class ServerProvider
9
{
10
    /**
11
     * @var ServerInterface
12
     */
13
    private ServerInterface $server;
14
    private ListenerEventManagerInterface $listenerEventManager;
15
16
17
    /**
18
     * @param ServerInterface $server
19
     * @param ListenerEventManagerInterface $listenerEventManager
20
     *
21
     * @return void
22
     */
23
    public function __construct(ServerInterface $server, ListenerEventManagerInterface $listenerEventManager) {
24
        $this->server = $server;
25
        $this->listenerEventManager = $listenerEventManager;
26
    }
27
28
    public function boot(): void
29
    {
30
        $this->server->start();
31
32
    }
33
34
35
}