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

MxSearch   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 32
rs 10
c 1
b 0
f 1
ccs 0
cts 9
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A execute() 0 4 1
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