Passed
Push — master ( 2f5dcf...04013c )
by Wim
06:39
created

GameserverTasks::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Thunderbug\Tracker\Tasks;
5
6
use Spatie\Async\Task;
7
use Thunderbug\QuakeConnection\Master\Server;
8
use Thunderbug\QuakeConnection\Server\Gameserver;
9
10
/**
11
 * Class GameserverTasks
12
 * @package Thunderbug\Tracker\Tasks
13
 */
14
class GameserverTasks extends Task
15
{
16
    private $server;
17
18
    /**
19
     * GameserverTasks constructor.
20
     * @param Server $server
21
     */
22
    public function __construct(Server $server)
23
    {
24
        $this->server = $server;
25
    }
26
27
    public function configure()
28
    {
29
30
    }
31
32
    /**
33
     * @throws \Exception
34
     */
35
    public function run()
36
    {
37
        $gameserver = new Gameserver($this->server->getIp(), $this->server->getPort());
38
        $gameserver->getStatus($cvarlist, $playerlist);
39
    }
40
}