Passed
Pull Request — master (#820)
by Maxim
16:07
created
src/Events/tests/Config/EventsConfigTest.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,8 @@
 block discarded – undo
64 64
         $config = new EventsConfig([
65 65
             'interceptors' => [
66 66
                 'bar',
67
-                new class implements CoreInterceptorInterface {
67
+                new class implements CoreInterceptorInterface
68
+                {
68 69
                     public function process(string $controller, string $action, array $parameters, CoreInterface $core): mixed
69 70
                     {
70 71
                     }
Please login to merge, or discard this patch.
src/Events/tests/EventDispatcherTest.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,9 @@
 block discarded – undo
13 13
 {
14 14
     public function testDispatch(): void
15 15
     {
16
-        $event = new class() {};
16
+        $event = new class()
17
+        {
18
+};
17 19
 
18 20
         $core = m::mock(CoreInterface::class);
19 21
         $core
Please login to merge, or discard this patch.
src/Events/tests/Interceptor/CoreTest.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,9 @@
 block discarded – undo
13 13
 {
14 14
     public function testCallAction(): void
15 15
     {
16
-        $event = new class() {};
16
+        $event = new class()
17
+        {
18
+};
17 19
 
18 20
         $dispatcher = m::mock(EventDispatcherInterface::class);
19 21
         $dispatcher
Please login to merge, or discard this patch.
src/Events/src/Bootloader/EventsBootloader.php 1 patch
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -70,11 +70,13 @@  discard block
 block discarded – undo
70 70
         FinalizerInterface $finalizer,
71 71
         ?EventDispatcherInterface $eventDispatcher = null
72 72
     ): void {
73
-        if ($eventDispatcher !== null) {
73
+        if ($eventDispatcher !== null)
74
+        {
74 75
             $this->initEventDispatcher(new Core($eventDispatcher), $config, $container, $factory);
75 76
         }
76 77
 
77
-        foreach ($config->getProcessors() as $processor) {
78
+        foreach ($config->getProcessors() as $processor)
79
+        {
78 80
             $processor = $this->autowire($processor, $container, $factory);
79 81
 
80 82
             \assert($processor instanceof ProcessorInterface);
@@ -85,7 +87,8 @@  discard block
 block discarded – undo
85 87
             $registry->process();
86 88
         });
87 89
 
88
-        if ($finalizer instanceof EventDispatcherAwareInterface && $eventDispatcher !== null) {
90
+        if ($finalizer instanceof EventDispatcherAwareInterface && $eventDispatcher !== null)
91
+        {
89 92
             $finalizer->setEventDispatcher($eventDispatcher);
90 93
         }
91 94
     }
@@ -106,7 +109,8 @@  discard block
 block discarded – undo
106 109
     ): void {
107 110
         $core = new InterceptableCore($core);
108 111
 
109
-        foreach ($config->getInterceptors() as $interceptor) {
112
+        foreach ($config->getInterceptors() as $interceptor)
113
+        {
110 114
             $interceptor = $this->autowire($interceptor, $container, $factory);
111 115
 
112 116
             \assert($interceptor instanceof CoreInterceptorInterface);
@@ -118,9 +122,12 @@  discard block
 block discarded – undo
118 122
 
119 123
     private function autowire(string|object $id, ContainerInterface $container, FactoryInterface $factory): object
120 124
     {
121
-        if (\is_string($id)) {
125
+        if (\is_string($id))
126
+        {
122 127
             $id = $container->get($id);
123
-        } elseif ($id instanceof Autowire) {
128
+        }
129
+        elseif ($id instanceof Autowire)
130
+        {
124 131
             $id = $id->resolve($factory);
125 132
         }
126 133
 
Please login to merge, or discard this patch.