Completed
Pull Request — master (#104)
by
unknown
04:57 queued 02:15
created

MxSearch::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 1
ccs 0
cts 4
cp 0
cc 1
eloc 2
nc 1
nop 2
crap 2
1
<?php
2
3
4
namespace eXpansion\Bundle\Maps\ChatCommand;
5
6
use eXpansion\Bundle\Maps\Plugins\Gui\ManiaExchangeWindowFactory;
7
use eXpansion\Bundle\Maps\Plugins\Gui\MapsWindowFactory;
8
use eXpansion\Bundle\Maps\Plugins\ManiaExchange;
9
use eXpansion\Bundle\Maps\Plugins\Maps;
10
use eXpansion\Framework\AdminGroups\Helpers\AdminGroups;
11
use eXpansion\Framework\Core\Model\ChatCommand\AbstractChatCommand;
12
use Symfony\Component\Console\Input\InputInterface;
13
use Tests\eXpansion\Framework\AdminGroups\TestHelpers\AdminChatCommand;
14
15
16
/**
17
 * Class Records
18
 *
19
 * @package eXpansion\Bundle\LocalRecords\ChatCommand;
20
 * @author  reaby
21
 */
22
class MxSearch extends AdminChatCommand
23
{
24
    /** @var ManiaExchangeWindowFactory */
25
    protected $maniaExchangeWindowFactory;
26
    /**
27
     * @var ManiaExchangeWindowFactory
28
     */
29
    private $exchangeWindowFactory;
30
31
    /**
32
     * MxSearch constructor.
33
     * @param $command
34
     * @param string $permission
35
     * @param array $aliases
36
     * @param AdminGroups $adminGroupsHelper
37
     * @param ManiaExchangeWindowFactory $exchangeWindowFactory
38
     */
39
    public function __construct($command, $permission, $aliases = [], AdminGroups $adminGroupsHelper, ManiaExchangeWindowFactory $exchangeWindowFactory)
40
    {
41
        parent::__construct($command, $permission, $aliases, $adminGroupsHelper);
42
43
        $this->exchangeWindowFactory = $exchangeWindowFactory;
44
    }
45
46
    /**
47
     * @inheritdoc
48
     */
49
    public function execute($login, InputInterface $input)
50
    {
51
        $this->exchangeWindowFactory->create($login);
52
    }
53
}
54