Code Duplication    Length = 26-31 lines in 3 locations

src/eXpansion/Bundle/Menu/Plugins/MenuItems.php 1 location

@@ 18-43 (lines=26) @@
15
 * @copyright 2017 eXpansion
16
 * @package eXpansion\Bundle\Menu\Plugins
17
 */
18
class MenuItems implements ListenerMenuItemProviderInterface
19
{
20
    /**
21
     * Register items tot he parent item.
22
     *
23
     * @param ParentItem $root
24
     *
25
     * @return mixed
26
     */
27
    public function registerMenuItems(ParentItem $root)
28
    {
29
        $root->addChild(
30
            ParentItem::class,
31
            'general',
32
            'expansion_menu.general.label',
33
            null
34
        );
35
        $root->addChild(
36
            ChatCommandItem::class,
37
            'general/help',
38
            'expansion_menu.general.help',
39
            null,
40
            ['cmd' => '/help']
41
        );
42
    }
43
}

src/eXpansion/Bundle/VoteManager/Plugins/MenuItems.php 1 location

@@ 18-48 (lines=31) @@
15
 * @copyright 2017 eXpansion
16
 * @package eXpansion\Bundle\Menu\Plugins
17
 */
18
class MenuItems implements ListenerMenuItemProviderInterface
19
{
20
    /**
21
     * Register items tot he parent item.
22
     *
23
     * @param ParentItem $root
24
     *
25
     * @return mixed
26
     */
27
    public function registerMenuItems(ParentItem $root)
28
    {
29
        $root->addChild(
30
            ChatCommandItem::class,
31
            'general/restart',
32
            'expansion_votemanager.menu.restart',
33
            null,
34
            ['cmd' => '/res']
35
        );
36
37
        $root->addChild(
38
            ChatCommandItem::class,
39
            'general/skip',
40
            'expansion_votemanager.menu.skip',
41
            null,
42
            ['cmd' => '/skip']
43
        );
44
45
46
47
    }
48
}
49

src/eXpansion/Bundle/Players/Plugins/MenuItems.php 1 location

@@ 16-42 (lines=27) @@
13
 * @package eXpansion\Bundle\LocalRecords\Plugins;
14
 * @author  oliver de Cramer <[email protected]>
15
 */
16
class MenuItems implements ListenerMenuItemProviderInterface
17
{
18
19
    /**
20
     * Register items tot he parent item.
21
     *
22
     * @param ParentItem $root
23
     *
24
     * @return mixed
25
     */
26
    public function registerMenuItems(ParentItem $root)
27
    {
28
        $root->addChild(
29
            ParentItem::class,
30
            'players',
31
            'expansion_players.menu.label',
32
            null // Permission are handled by sub elements.
33
        );
34
        $root->addChild(
35
            ChatCommandItem::class,
36
            'players/list',
37
            'expansion_players.menu.list',
38
            null,
39
            ['cmd' => '/players']
40
        );
41
    }
42
}
43