GameserverTasks   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 25
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 2 1
A __construct() 0 3 1
A run() 0 4 1
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
}