@@ -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 | /** |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | return $condition; |
45 | 45 | } |
46 | 46 | } |
47 | - throw new MenuItemConditionNotSupportedException("Condition $name is not defined."); |
|
47 | + throw new MenuItemConditionNotSupportedException("condition $name is not defined."); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | 51 | * @throws MenuItemConditionNotSupportedException |
52 | 52 | */ |
53 | 53 | protected function insertConditions(MenuItem &$item, array $definition): void { |
54 | - if(!array_key_exists(static::SECTION_CONDITIONS, $definition) OR !is_array($definition[static::SECTION_CONDITIONS])) { |
|
54 | + if(!array_key_exists(static::SECTION_CONDITIONS, $definition) or !is_array($definition[static::SECTION_CONDITIONS])) { |
|
55 | 55 | return; |
56 | 56 | } |
57 | 57 | foreach($definition[static::SECTION_CONDITIONS] as $condition => $value) { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | $item = new MenuItem($definition["link"], $text); |
82 | 82 | $this->insertConditions($item, $definition); |
83 | - if(isset($definition["items"]) AND is_array($definition["items"])) { |
|
83 | + if(isset($definition["items"]) and is_array($definition["items"])) { |
|
84 | 84 | foreach($definition["items"] as $subtext => $subdefinition) { |
85 | 85 | $item[] = $this->createItem($subtext, $subdefinition); |
86 | 86 | } |