Completed
Pull Request — master (#1)
by David
01:49
created
src/Loaders/Page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Menu/MenuRegistry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Menu/MenuItem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
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
      * @param MenuItem[] $children
73 73
      */
74
-    public function __construct(string $label, string $url=null, array $children=[]) {
74
+    public function __construct(string $label, string $url = null, array $children = []) {
75 75
         $this->label = $label;
76 76
         $this->url = $url;
77 77
         $this->children = $children;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             return true;
168 168
         }
169 169
 
170
-        if($this->activateBasedOnUrl && $this->url !== null) {
170
+        if ($this->activateBasedOnUrl && $this->url !== null) {
171 171
             $urlParts = parse_url($_SERVER['REQUEST_URI']);
172 172
             $menuUrlParts = parse_url($this->getLink($rootUrl));
173 173
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                 $requestUrl = '/';
184 184
             }
185 185
 
186
-            if($requestUrl === $menuUrl) {
186
+            if ($requestUrl === $menuUrl) {
187 187
                 return true;
188 188
             }
189 189
         }
Please login to merge, or discard this patch.
src/Registry/StaticRegistry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.