@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | /** |
| 54 | 54 | * @param string[]|null $menu |
| 55 | 55 | */ |
| 56 | - public function __construct(?string $id, string $title, string $content, string $url, string $lang, ?string $website, ?array $menu, ?int $menuOrder, ?string $metaTitle, ?string $metaDescription, ?string $theme) |
|
| 56 | + public function __construct(?string $id, string $title, string $content, string $url, string $lang, ?string $website, ? array $menu, ?int $menuOrder, ?string $metaTitle, ?string $metaDescription, ?string $theme) |
|
| 57 | 57 | { |
| 58 | 58 | $this->id = $id; |
| 59 | 59 | $this->title = $title; |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | /** |
| 168 | 168 | * @return null|string[] |
| 169 | 169 | */ |
| 170 | - public function getMenu(): ?array |
|
| 170 | + public function getMenu(): ? array |
|
| 171 | 171 | { |
| 172 | 172 | return $this->menu; |
| 173 | 173 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param float $priority |
| 31 | 31 | * @param string|null $cssClass |
| 32 | 32 | */ |
| 33 | - public function registerMenuItem(array $items, ?string $url, float $priority = 0.0, ?string $cssClass = null): void |
|
| 33 | + public function registerMenuItem(array $items, ?string $url, float $priority = 0.0, ?string $cssClass = null) : void |
|
| 34 | 34 | { |
| 35 | 35 | $this->registerSubMenuItem($this->rootMenu, $items, $url, $priority, $cssClass); |
| 36 | 36 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * @param float $priority |
| 42 | 42 | * @param string|null $cssClass |
| 43 | 43 | */ |
| 44 | - public function registerSubMenuItem(MenuItem $menuItem, array $items, ?string $url, float $priority = 0.0, ?string $cssClass): void |
|
| 44 | + public function registerSubMenuItem(MenuItem $menuItem, array $items, ?string $url, float $priority = 0.0, ?string $cssClass) : void |
|
| 45 | 45 | { |
| 46 | 46 | $label = array_shift($items); |
| 47 | 47 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $block = new Block($this->themeRegistry->getThemeDescriptor($page->getTheme()), [ |
| 42 | - 'content' => [ $page->getContent() ], |
|
| 42 | + 'content' => [$page->getContent()], |
|
| 43 | 43 | 'title' => $page->getTitle() |
| 44 | 44 | ]); |
| 45 | 45 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * @param string $label The text for the menu item |
| 71 | 71 | * @param string|null $url The link for the menu (relative to the root url), unless it starts with / or http:// or https:// or # or ?. |
| 72 | 72 | */ |
| 73 | - public function __construct(string $label, string $url=null) { |
|
| 73 | + public function __construct(string $label, string $url = null) { |
|
| 74 | 74 | $this->label = $label; |
| 75 | 75 | $this->url = $url; |
| 76 | 76 | $this->children = new \SplPriorityQueue(); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | return true; |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - if($this->activateBasedOnUrl && $this->url !== null) { |
|
| 132 | + if ($this->activateBasedOnUrl && $this->url !== null) { |
|
| 133 | 133 | $urlParts = parse_url($_SERVER['REQUEST_URI']); |
| 134 | 134 | $menuUrlParts = parse_url($this->getLink($rootUrl)); |
| 135 | 135 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | $requestUrl = '/'; |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - if($requestUrl === $menuUrl) { |
|
| 148 | + if ($requestUrl === $menuUrl) { |
|
| 149 | 149 | return true; |
| 150 | 150 | } |
| 151 | 151 | } |