@@ -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 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @param float $priority |
43 | 43 | * @param string|null $cssClass |
44 | 44 | */ |
45 | - private function registerSubMenuItem(MenuItem $menuItem, array $items, ?string $url, float $priority = 0.0, ?string $cssClass): void |
|
45 | + private function registerSubMenuItem(MenuItem $menuItem, array $items, ?string $url, float $priority = 0.0, ?string $cssClass) : void |
|
46 | 46 | { |
47 | 47 | $label = array_shift($items); |
48 | 48 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param string $label The text for the menu item |
47 | 47 | * @param string|null $url The link for the menu (relative to the root url), unless it starts with / or http:// or https:// or # or ?. |
48 | 48 | */ |
49 | - public function __construct(string $label, string $url=null) { |
|
49 | + public function __construct(string $label, string $url = null) { |
|
50 | 50 | $this->label = $label; |
51 | 51 | $this->url = $url; |
52 | 52 | $this->children = new \SplPriorityQueue(); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * |
133 | 133 | * @param string|null $cssClass |
134 | 134 | */ |
135 | - public function setCssClass(?string $cssClass): void { |
|
135 | + public function setCssClass(?string $cssClass) : void { |
|
136 | 136 | $this->cssClass = $cssClass; |
137 | 137 | } |
138 | 138 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | $pageBlock = new Block($themeDescriptor, [ |
55 | - 'content' => [ $contentBlock ], |
|
55 | + 'content' => [$contentBlock], |
|
56 | 56 | 'title' => $page->getTitle(), |
57 | 57 | 'url' => $page->getUrl(), |
58 | 58 | 'menu' => $this->pageRegistry->getRootMenuItem() |
@@ -65,7 +65,9 @@ |
||
65 | 65 | */ |
66 | 66 | private function isAssoc(array $arr): bool |
67 | 67 | { |
68 | - if (array() === $arr) return false; |
|
68 | + if (array() === $arr) { |
|
69 | + return false; |
|
70 | + } |
|
69 | 71 | return array_keys($arr) !== range(0, count($arr) - 1); |
70 | 72 | } |
71 | 73 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @param string[]|null $menu |
68 | 68 | * @param mixed[] $context |
69 | 69 | */ |
70 | - public function __construct(?string $id, string $title, string $content, string $url, string $lang, ?string $website, ?array $menu, ?int $menuOrder, ?string $menuCssClass, ?string $metaTitle, ?string $metaDescription, ?string $theme, ?string $template, array $context = []) |
|
70 | + public function __construct(?string $id, string $title, string $content, string $url, string $lang, ?string $website, ? array $menu, ?int $menuOrder, ?string $menuCssClass, ?string $metaTitle, ?string $metaDescription, ?string $theme, ?string $template, array $context = []) |
|
71 | 71 | { |
72 | 72 | $this->id = $id; |
73 | 73 | $this->title = $title; |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | /** |
233 | 233 | * @return null|string[] |
234 | 234 | */ |
235 | - public function getMenu(): ?array |
|
235 | + public function getMenu(): ? array |
|
236 | 236 | { |
237 | 237 | return $this->menu; |
238 | 238 | } |