Conditions | 5 |
Paths | 5 |
Total Lines | 27 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function __construct( |
||
27 | $menuId, |
||
28 | $locale, |
||
29 | $menuItemLabel, |
||
30 | $menuItemUrl, |
||
31 | $menuItemOrder = 0, |
||
32 | $menuItemParentId = null |
||
33 | ) { |
||
34 | if (null === $menuId) { |
||
35 | throw new \InvalidArgumentException('The menu id cannot be null'); |
||
36 | } |
||
37 | if (null === $locale) { |
||
38 | throw new \InvalidArgumentException('The locale cannot be null'); |
||
39 | } |
||
40 | if (null === $menuItemLabel) { |
||
41 | throw new \InvalidArgumentException('The menu item label cannot be null'); |
||
42 | } |
||
43 | if (null === $menuItemUrl) { |
||
44 | throw new \InvalidArgumentException('The menu item url cannot be null'); |
||
45 | } |
||
46 | $this->menuId = $menuId; |
||
47 | $this->locale = $locale; |
||
48 | $this->menuItemLabel = $menuItemLabel; |
||
49 | $this->menuItemUrl = $menuItemUrl; |
||
50 | $this->menuItemOrder = $menuItemOrder; |
||
51 | $this->menuItemParentId = $menuItemParentId; |
||
52 | } |
||
53 | |||
84 |