Code Duplication    Length = 37-37 lines in 2 locations

src/LIN3S/CMSKernel/Application/Command/Menu/AddMenuTranslationCommand.php 1 location

@@ 17-53 (lines=37) @@
14
/**
15
 * @author Beñat Espiña <[email protected]>
16
 */
17
class AddMenuTranslationCommand
18
{
19
    private $menuId;
20
    private $locale;
21
    private $name;
22
23
    public function __construct($menuId, $locale, $name)
24
    {
25
        if (null === $menuId) {
26
            throw new \InvalidArgumentException('The menu id cannot be null');
27
        }
28
        if (null === $locale) {
29
            throw new \InvalidArgumentException('The locale cannot be null');
30
        }
31
        if (null === $name) {
32
            throw new \InvalidArgumentException('The name cannot be null');
33
        }
34
        $this->menuId = $menuId;
35
        $this->locale = $locale;
36
        $this->name = $name;
37
    }
38
39
    public function menuId()
40
    {
41
        return $this->menuId;
42
    }
43
44
    public function locale()
45
    {
46
        return $this->locale;
47
    }
48
49
    public function name()
50
    {
51
        return $this->name;
52
    }
53
}
54

src/LIN3S/CMSKernel/Application/Command/Menu/RemoveMenuItemCommand.php 1 location

@@ 17-53 (lines=37) @@
14
/**
15
 * @author Beñat Espiña <[email protected]>
16
 */
17
class RemoveMenuItemCommand
18
{
19
    private $menuId;
20
    private $locale;
21
    private $menuItemId;
22
23
    public function __construct($menuId, $locale, $menuItemId)
24
    {
25
        if (null === $menuId) {
26
            throw new \InvalidArgumentException('The menu id cannot be null');
27
        }
28
        if (null === $locale) {
29
            throw new \InvalidArgumentException('The locale cannot be null');
30
        }
31
        if (null === $menuItemId) {
32
            throw new \InvalidArgumentException('The menu item id cannot be null');
33
        }
34
        $this->menuId = $menuId;
35
        $this->locale = $locale;
36
        $this->menuItemId = $menuItemId;
37
    }
38
39
    public function menuId()
40
    {
41
        return $this->menuId;
42
    }
43
44
    public function locale()
45
    {
46
        return $this->locale;
47
    }
48
49
    public function menuItemId()
50
    {
51
        return $this->menuItemId;
52
    }
53
}
54