Code Duplication    Length = 15-15 lines in 2 locations

src/eXpansion/Bundle/JoinLeaveMessages/Plugins/JoinLeaveMessages.php 2 locations

@@ 48-62 (lines=15) @@
45
    /**
46
     * @inheritdoc
47
     */
48
    public function onPlayerConnect(Player $player)
49
    {
50
        $groupName = $this->adminGroups->getLoginUserGroups($player->getLogin())->getName();
51
52
        $this->chat->sendMessage(
53
            "expansion_join_leave_messages.connect",
54
            null,
55
            [
56
                "%group%" => $this->adminGroups->getGroupLabel($groupName),
57
                "%nickname%" => $player->getNickName(),
58
                "%login%" => $player->getLogin(),
59
                "%path%" => $player->getPath(),
60
                "%ladder%" => $player->getLadderScore(),
61
            ]);
62
    }
63
64
    /**
65
     * @inheritdoc
@@ 67-81 (lines=15) @@
64
    /**
65
     * @inheritdoc
66
     */
67
    public function onPlayerDisconnect(Player $player, $disconnectionReason)
68
    {
69
        $groupName = $this->adminGroups->getLoginUserGroups($player->getLogin())->getName();
70
71
        $this->chat->sendMessage(
72
            "expansion_join_leave_messages.disconnect",
73
            null,
74
            [
75
                "%group%" => $this->adminGroups->getGroupLabel($groupName),
76
                "%nickname%" => $player->getNickName(),
77
                "%login%" => $player->getLogin(),
78
                "%path%" => $player->getPath(),
79
                "%ladder%" => $player->getLadderScore(),
80
            ]);
81
    }
82
83
    /**
84
     * @inheritdoc