@@ -40,14 +40,14 @@ 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 | /** |
| 47 | 47 | * @throws MenuItemConditionNotSupportedException |
| 48 | 48 | */ |
| 49 | 49 | protected function insertConditions(MenuItem &$item, array $definition): void { |
| 50 | - if(!array_key_exists(static::SECTION_CONDITIONS, $definition) OR !is_array($definition[static::SECTION_CONDITIONS])) { |
|
| 50 | + if(!array_key_exists(static::SECTION_CONDITIONS, $definition) or !is_array($definition[static::SECTION_CONDITIONS])) { |
|
| 51 | 51 | return; |
| 52 | 52 | } |
| 53 | 53 | foreach($definition[static::SECTION_CONDITIONS] as $condition => $value) { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | $item = new MenuItem($definition["link"], $text); |
| 78 | 78 | $this->insertConditions($item, $definition); |
| 79 | - if(isset($definition["items"]) AND is_array($definition["items"])) { |
|
| 79 | + if(isset($definition["items"]) and is_array($definition["items"])) { |
|
| 80 | 80 | foreach($definition["items"] as $subtext => $subdefinition) { |
| 81 | 81 | $item[] = $this->createItem($subtext, $subdefinition); |
| 82 | 82 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $link = $this->link; |
| 32 | 32 | foreach($this->linkRenders as $render) { |
| 33 | 33 | if($render->isApplicable($this->link)) { |
| 34 | - $link = $render->renderLink($this->link); |
|
| 34 | + $link = $render->renderLink($this->link); |
|
| 35 | 35 | break; |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | throw new MenuTypeAlreadyDefinedException("Menu type $name is already defined."); |
| 38 | 38 | } |
| 39 | 39 | if(!file_exists($template)) { |
| 40 | - throw new TemplateNotFoundException("File $template does not exist."); |
|
| 40 | + throw new TemplateNotFoundException("file $template does not exist."); |
|
| 41 | 41 | } |
| 42 | 42 | $this->templates[$name] = (string) realpath($template); |
| 43 | 43 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | return $menu; |
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | - throw new MenuNotFoundException("Menu $menuName not found."); |
|
| 54 | + throw new MenuNotFoundException("menu $menuName not found."); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |