Completed
Pull Request — master (#194)
by De Cramer
24:15 queued 02:45
created

Players::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
ccs 0
cts 4
cp 0
cc 1
eloc 6
nc 1
nop 3
crap 2
1
<?php
2
3
4
namespace eXpansion\Bundle\Players\ChatCommand;
5
6
use eXpansion\Bundle\Players\Plugins\Gui\PlayersWindow;
7
use eXpansion\Framework\Core\Model\ChatCommand\AbstractChatCommand;
8
use Symfony\Component\Console\Input\InputInterface;
9
10
11
/**
12
 * Class Players
13
 *
14
 * @package eXpansion\Bundle\Players\ChatCommand;
15
 * @author  reaby
16
 */
17
class Players extends AbstractChatCommand
18
{
19
    private $playersWindowFactory;
20
21
    /**
22
     * Records constructor.
23
     *
24
     * @param               $command
25
     * @param array         $aliases
26
     * @param PlayersWindow $recordsWindowFactory
27
     */
28
    public function __construct(
29
        $command,
30
        array $aliases = [],
31
        PlayersWindow $recordsWindowFactory
32
    ) {
33
        parent::__construct($command, $aliases);
34
35
        $this->playersWindowFactory = $recordsWindowFactory;
36
37
    }
38
39
    /**
40
     * @inheritdoc
41
     */
42
    public function execute($login, InputInterface $input)
43
    {
44
        $this->playersWindowFactory->create($login);
45
    }
46
}
47