Test Failed
Push — main ( 0eb966...5da9e4 )
by Michael
02:44
created
src/Events/MenuEvent.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,10 @@
 block discarded – undo
34 34
      */
35 35
     private function append_iterators(...$iterators): iterable
36 36
     {
37
-        foreach ($iterators as $iterator)
38
-            foreach ($iterator as $row)
37
+        foreach ($iterators as $iterator) {
38
+                    foreach ($iterator as $row)
39 39
                 yield ($row);
40
+        }
40 41
     }
41 42
 
42 43
 }
43 44
\ No newline at end of file
Please login to merge, or discard this patch.
src/Services/Resolver/AbstractMenuResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
         $uri = $this->generator->generate($item->getRouteName(), $item->getRouteParameters());
37 37
 
38
-        if ($uri === $this->requestStack->getCurrentRequest()?->getPathInfo()) {
38
+        if ($uri === $this->requestStack->getCurrentRequest() ? ->getPathInfo()) {
39 39
             $item->setCurrent(true);
40 40
             return true;
41 41
         }
Please login to merge, or discard this patch.
tests/functional/MenuEventTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function test_event_triggers()
15 15
     {
16 16
         $menuService = $this->kernel->getContainer()->get(Menu::class);
17
-        $results = $menuService->getMenuResult([],'test_event_menu');
17
+        $results = $menuService->getMenuResult([], 'test_event_menu');
18 18
         $this->assertSame(3, count($results));
19 19
 
20 20
         $this->assertSame('Prepended Item', $results[0]->getLabel());
Please login to merge, or discard this patch.
tests/app/src/Menu/TestMenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@
 block discarded – undo
12 12
     {
13 13
         yield MenuItem::system('System', 'test', [], 'images/svg/system.svg')
14 14
             ->setRouteParameter('name', 'test_menu')
15
-            ->setChildren(function () {
16
-                yield MenuItem::section('Section', 'test_one', [], 'images/svg/thunder.svg')->setChildren(function () {
15
+            ->setChildren(function() {
16
+                yield MenuItem::section('Section', 'test_one', [], 'images/svg/thunder.svg')->setChildren(function() {
17 17
                     yield MenuItem::linkToRoute('Site', 'test_two', [], '@Menu/svg/default_folder.svg');
18 18
                     yield MenuItem::linkToRoute('Dashboard', 'test_three');
19 19
                 });
20 20
             });
21 21
 
22
-        yield MenuItem::system('System', 'test', ['name' => 'test_menu'], 'images/svg/system.svg')->setChildren(function () {
23
-            yield MenuItem::section('Section', 'test_one', [], 'images/svg/thunder.svg')->setChildren(function () {
22
+        yield MenuItem::system('System', 'test', ['name' => 'test_menu'], 'images/svg/system.svg')->setChildren(function() {
23
+            yield MenuItem::section('Section', 'test_one', [], 'images/svg/thunder.svg')->setChildren(function() {
24 24
                 yield MenuItem::linkToRoute('Site', 'test_two', [], '@Menu/svg/default_folder.svg');
25 25
                 yield MenuItem::linkToRoute('Dashboard', 'test_three');
26 26
             });
Please login to merge, or discard this patch.
tests/app/src/Menu/TestEventMenu.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
     public function define(): Traversable
24 24
     {
25 25
 
26
-        $items = function () {
26
+        $items = function() {
27 27
             yield MenuItem::system('System', 'test', [], 'images/svg/system.svg')
28 28
                 ->setRouteParameter('name', 'test_menu')
29
-                ->setChildren(function () {
30
-                    yield MenuItem::section('Section', 'test_one', [], 'images/svg/thunder.svg')->setChildren(function () {
29
+                ->setChildren(function() {
30
+                    yield MenuItem::section('Section', 'test_one', [], 'images/svg/thunder.svg')->setChildren(function() {
31 31
                         yield MenuItem::linkToRoute('Site', 'test_two', [], '@Menu/svg/default_folder.svg');
32 32
                         yield MenuItem::linkToRoute('Dashboard', 'test_three');
33 33
                     });
Please login to merge, or discard this patch.
tests/app/src/Events/Subscriber/TestSubscriber.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
     public function addTestItems(MenuEvent $event)
21 21
     {
22 22
         $event->prepend(function () {
23
-          yield MenuItem::system('Prepended Item', 'test') ->setRouteParameter('name', 'test_menu');
23
+            yield MenuItem::system('Prepended Item', 'test') ->setRouteParameter('name', 'test_menu');
24 24
         });
25 25
 
26 26
         $event->append(function () {
27
-          yield MenuItem::system('Appended Item', 'test') ->setRouteParameter('name', 'test_menu');
27
+            yield MenuItem::system('Appended Item', 'test') ->setRouteParameter('name', 'test_menu');
28 28
         });
29 29
     }
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
 
20 20
     public function addTestItems(MenuEvent $event)
21 21
     {
22
-        $event->prepend(function () {
22
+        $event->prepend(function() {
23 23
           yield MenuItem::system('Prepended Item', 'test') ->setRouteParameter('name', 'test_menu');
24 24
         });
25 25
 
26
-        $event->append(function () {
26
+        $event->append(function() {
27 27
           yield MenuItem::system('Appended Item', 'test') ->setRouteParameter('name', 'test_menu');
28 28
         });
29 29
     }
Please login to merge, or discard this patch.