ServerInfo::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
namespace eXpansion\Bundle\ServerInformation\ChatCommand;
4
5
use eXpansion\Bundle\ServerInformation\Plugins\Gui\ServerInfoWindow;
6
use eXpansion\Framework\Core\Model\ChatCommand\AbstractChatCommand;
7
use Symfony\Component\Console\Input\InputInterface;
8
9
class ServerInfo extends AbstractChatCommand
10
{
11
    /** @var ServerInfoWindow */
12
    protected $serverInformationWindow;
13
14
    /**
15
     * @inheritdoc
16
     */
17
    public function __construct(ServerInfoWindow $serverInformationWindow, $command, array $aliases = [])
18
    {
19
        parent::__construct($command, $aliases);
20
21
        $this->serverInformationWindow = $serverInformationWindow;
22
    }
23
24
    /**
25
     * Method called to execute the chat command.
26
     *
27
     * @param string $login
28
     * @param InputInterface $input
29
     *
30
     * @return mixed
31
     */
32
    public function execute($login, InputInterface $input)
33
    {
34
        $this->serverInformationWindow->create($login);
35
    }
36
}
37