@@ -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 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * @param mixed[] $context |
73 | 73 | * @param string[] $tags |
74 | 74 | */ |
75 | - 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 = [], array $tags = []) |
|
75 | + 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 = [], array $tags = []) |
|
76 | 76 | { |
77 | 77 | $this->id = $id; |
78 | 78 | $this->title = $title; |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | /** |
241 | 241 | * @return null|string[] |
242 | 242 | */ |
243 | - public function getMenu(): ?array |
|
243 | + public function getMenu(): ? array |
|
244 | 244 | { |
245 | 245 | return $this->menu; |
246 | 246 | } |