@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | throw new MenuTypeAlreadyDefinedException("Menu type $name is already defined"); |
| 41 | 41 | } |
| 42 | 42 | if(!file_exists($template)) { |
| 43 | - throw new TemplateNotFoundException("File $template does not exist."); |
|
| 43 | + throw new TemplateNotFoundException("file $template does not exist."); |
|
| 44 | 44 | } |
| 45 | 45 | $this->templates[$name] = realpath($template); |
| 46 | 46 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | return $menu; |
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | - throw new MenuNotFoundException("Menu $menuName not found."); |
|
| 59 | + throw new MenuNotFoundException("menu $menuName not found."); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | return $service; |
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | - throw new MenuItemConditionNotSupportedException("Condition $name is not defined."); |
|
| 43 | + throw new MenuItemConditionNotSupportedException("condition $name is not defined."); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | throw new InvalidMenuItemDefinitionException("Menu item is missing link."); |
| 59 | 59 | } |
| 60 | 60 | $item = new MenuItem($definition["link"], $text); |
| 61 | - if(array_key_exists(static::SECTION_CONDITIONS, $definition) AND is_array($definition[static::SECTION_CONDITIONS])) { |
|
| 61 | + if(array_key_exists(static::SECTION_CONDITIONS, $definition) and is_array($definition[static::SECTION_CONDITIONS])) { |
|
| 62 | 62 | foreach($definition[static::SECTION_CONDITIONS] as $condition => $value) { |
| 63 | 63 | try { |
| 64 | 64 | $conditionService = $this->getCondition($condition); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $item->addCondition($conditionService, $value); |
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | - if(isset($definition["items"]) AND is_array($definition["items"])) { |
|
| 71 | + if(isset($definition["items"]) and is_array($definition["items"])) { |
|
| 72 | 72 | foreach($definition["items"] as $subtext => $subdefinition) { |
| 73 | 73 | $item[] = $this->createItem($subtext, $subdefinition); |
| 74 | 74 | } |