Code Duplication    Length = 34-37 lines in 3 locations

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

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

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