Code Duplication    Length = 26-31 lines in 2 locations

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

@@ 18-43 (lines=26) @@
15
 * @copyright 2017 Smile
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 Smile
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