Completed
Pull Request — master (#1)
by David
01:36
created
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/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.
src/Menu/MenuItem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
145 145
                 $requestUrl = '/';
146 146
             }
147 147
 
148
-            if($requestUrl === $menuUrl) {
148
+            if ($requestUrl === $menuUrl) {
149 149
                 return true;
150 150
             }
151 151
         }
Please login to merge, or discard this patch.