Completed
Push — master ( ff3199...9ab95e )
by De Cramer
9s
created

UpdateExpansion   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 43
ccs 0
cts 22
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getDescription() 0 4 1
A getHelp() 0 4 1
A execute() 0 5 1
1
<?php
2
3
namespace eXpansion\Framework\Core\ChatCommand;
4
5
use eXpansion\Framework\AdminGroups\Model\AbstractAdminChatCommand;
6
use eXpansion\Framework\Core\Helpers\ChatNotification;
7
use eXpansion\Framework\Core\Services\Application;
8
use eXpansion\Framework\Core\Storage\PlayerStorage;
9
use Symfony\Component\Console\Input\InputInterface;
10
11
/**
12
 * Class UpdateExpansion
13
 *
14
 * @author    de Cramer Oliver<[email protected]>
15
 * @copyright 2018 Oliverde8
16
 * @package eXpansion\Framework\Core\ChatCommand
17
 */
18
class UpdateExpansion extends AbstractAdminChatCommand
19
{
20
    /** @var ChatNotification */
21
    protected $chatNotificaiton;
22
23
    /**
24
     * UpdateExpansion constructor.
25
     *
26
     * @param $command
27
     * @param $permission
28
     * @param array $aliases
29
     * @param AdminGroups $adminGroups
30
     * @param ChatNotification $chatNotification
31
     */
32
    function __construct(
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
33
        $command,
34
        $permission,
35
        array $aliases = [],
36
        AdminGroups $adminGroups,
37
        ChatNotification $chatNotification
38
    ) {
39
        parent::__construct($command, $permission, $aliases, $adminGroups);
40
    }
41
42
    public function getDescription()
43
    {
44
        return "expansion_core.chat_commands.stop.help";
45
    }
46
47
    public function getHelp()
48
    {
49
        return "expansion_core.chat_commands.stop.help";
50
    }
51
52
    /**
53
     * @inheritdoc
54
     */
55
    public function execute($login, InputInterface $input)
56
    {
57
        $process = new Process("php bin/console eXpansion:update $login &");
58
        $process->start();
59
    }
60
}