Code Duplication    Length = 14-14 lines in 3 locations

src/eXpansion/Bundle/AdminChat/ChatCommand/AdminReturnCommand.php 1 location

@@ 26-39 (lines=14) @@
23
    /**
24
     * @inheritdoc
25
     */
26
    public function execute($login, InputInterface $input)
27
    {
28
        $nickName = $this->playerStorage->getPlayerInfo($login)->getNickName();
29
        $group = $this->getGroupLabel($login);
30
31
        $return = $this->connection->{$this->functionName}();
32
33
        $this->chatNotification->sendMessage(
34
            $this->chatMessage,
35
            $this->isPublic ? null : $login,
36
            ['%adminLevel%' => $group, '%admin%' => $nickName, '%return%' => $return]
37
        );
38
39
    }
40
}
41

src/eXpansion/Bundle/AdminChat/ChatCommand/TimeParameterCommand.php 1 location

@@ 73-86 (lines=14) @@
70
    /**
71
     * @inheritdoc
72
     */
73
    public function execute($login, InputInterface $input)
74
    {
75
        $nickName = $this->playerStorage->getPlayerInfo($login)->getNickName();
76
        $parameter = $this->timeHelper->textToTime($input->getArgument('parameter'));
77
        $group = $this->getGroupLabel($login);
78
79
        $this->chatNotification->sendMessage(
80
            $this->chatMessage,
81
            $this->isPublic ? null : $login,
82
            ['%adminLevel%' => $group, '%admin%' => $nickName, "%parameter%" => $parameter]
83
        );
84
85
        $this->connection->{$this->functionName}($parameter);
86
    }
87
88
    /**
89
     * @param string $parameterDescription

src/eXpansion/Bundle/AdminChat/ChatCommand/OneParameterCommand.php 1 location

@@ 115-128 (lines=14) @@
112
    /**
113
     * @inheritdoc
114
     */
115
    public function execute($login, InputInterface $input)
116
    {
117
        $nickName = $this->playerStorage->getPlayerInfo($login)->getNickName();
118
        $parameter = $input->getArgument('parameter');
119
        $group = $this->getGroupLabel($login);
120
121
        $this->chatNotification->sendMessage(
122
            $this->chatMessage,
123
            $this->isPublic ? null : $login,
124
            ['%adminLevel%' => $group, '%admin%' => $nickName, "%parameter%" => $parameter]
125
        );
126
127
        $this->connection->{$this->functionName}($parameter);
128
    }
129
}
130