@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function exists($menuName) |
| 57 | 57 | { |
| 58 | - return (bool)$this->getMenuObject($menuName); |
|
| 58 | + return (bool) $this->getMenuObject($menuName); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | $menu = $this->getMenuObject($menuName); |
| 87 | 87 | |
| 88 | - if (! $menu) { |
|
| 88 | + if (!$menu) { |
|
| 89 | 89 | throw new \Exception("Menu {$menuName} not found."); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | private function updateActive() |
| 143 | 143 | { |
| 144 | - $this->each(function ($item) { |
|
| 144 | + $this->each(function($item) { |
|
| 145 | 145 | if (isset($item->links)) { |
| 146 | 146 | $this->makeActive($item); |
| 147 | 147 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | private function makeActive($item, $parent = null) |
| 156 | 156 | { |
| 157 | - $item->links->each(function ($link) use ($item, $parent) { |
|
| 157 | + $item->links->each(function($link) use ($item, $parent) { |
|
| 158 | 158 | if ($link->slug == $this->active) { |
| 159 | 159 | $this->makeParentActive($parent); |
| 160 | 160 | $this->makeParentActive($item); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | private function makeParentActive($parent) |
| 175 | 175 | { |
| 176 | - if (! is_null($parent) |
|
| 176 | + if (!is_null($parent) |
|
| 177 | 177 | && method_exists($parent, 'activeParentage') |
| 178 | 178 | && $parent->activeParentage() |
| 179 | 179 | ) { |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | * |
| 8 | 8 | * @package NukaCode\Menu |
| 9 | 9 | */ |
| 10 | -class Container extends Collection |
|
| 11 | -{ |
|
| 10 | +class Container extends Collection { |
|
| 12 | 11 | |
| 13 | 12 | /** |
| 14 | 13 | * The slug to set to active during render |