| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 3 | public function get($name, array $options = []) |
|
| 44 | { |
||
| 45 | 3 | $menuItem = $this->repository->getOneMenuItemByName($name); |
|
| 46 | |||
| 47 | 3 | if (!$menuItem instanceof MenuItemInterface) { |
|
| 48 | throw new \InvalidArgumentException(sprintf('The menu "%s" is not defined.', $name)); |
||
| 49 | } |
||
| 50 | |||
| 51 | 3 | return $menuItem; |
|
| 52 | } |
||
| 53 | |||
| 64 |