@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | private readonly ContainerInterface $container, |
45 | 45 | private readonly BinderInterface $binder, |
46 | 46 | private readonly ConfiguratorInterface $config |
47 | - ) { |
|
47 | + ){ |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | public function defineSingletons(): array |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $builder ??= new CompatiblePipelineBuilder($dispatcher); |
117 | 117 | |
118 | 118 | $list = []; |
119 | - foreach ($config->getInterceptors() as $interceptor) { |
|
119 | + foreach ($config->getInterceptors() as $interceptor){ |
|
120 | 120 | $list[] = $container->get($interceptor); |
121 | 121 | } |
122 | 122 |
@@ -116,7 +116,8 @@ |
||
116 | 116 | $builder ??= new CompatiblePipelineBuilder($dispatcher); |
117 | 117 | |
118 | 118 | $list = []; |
119 | - foreach ($config->getInterceptors() as $interceptor) { |
|
119 | + foreach ($config->getInterceptors() as $interceptor) |
|
120 | + { |
|
120 | 121 | $list[] = $container->get($interceptor); |
121 | 122 | } |
122 | 123 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function __construct( |
50 | 50 | private readonly ConfiguratorInterface $configs |
51 | - ) { |
|
51 | + ){ |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | public function init(): void |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | FinalizerInterface $finalizer, |
73 | 73 | ?EventDispatcherInterface $eventDispatcher = null |
74 | 74 | ): void { |
75 | - if ($eventDispatcher !== null) { |
|
75 | + if ($eventDispatcher !== null){ |
|
76 | 76 | $this->initEventDispatcher(new Core($eventDispatcher), $config, $container, $factory); |
77 | 77 | } |
78 | 78 | |
79 | - foreach ($config->getProcessors() as $processor) { |
|
79 | + foreach ($config->getProcessors() as $processor){ |
|
80 | 80 | $processor = $this->autowire($processor, $container, $factory); |
81 | 81 | |
82 | 82 | \assert($processor instanceof ProcessorInterface); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $registry->process(); |
88 | 88 | }); |
89 | 89 | |
90 | - if ($finalizer instanceof EventDispatcherAwareInterface && $eventDispatcher !== null) { |
|
90 | + if ($finalizer instanceof EventDispatcherAwareInterface && $eventDispatcher !== null){ |
|
91 | 91 | $finalizer->setEventDispatcher($eventDispatcher); |
92 | 92 | } |
93 | 93 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @param TInterceptor $interceptor |
97 | 97 | */ |
98 | 98 | public function addInterceptor( |
99 | - string|InterceptorInterface|CoreInterceptorInterface|Container\Autowire $interceptor, |
|
99 | + string | InterceptorInterface | CoreInterceptorInterface | Container\Autowire $interceptor, |
|
100 | 100 | ): void { |
101 | 101 | $this->configs->modify(EventsConfig::CONFIG, new Append('interceptors', null, $interceptor)); |
102 | 102 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | ): void { |
110 | 110 | $builder = new CompatiblePipelineBuilder(); |
111 | 111 | $list = []; |
112 | - foreach ($config->getInterceptors() as $interceptor) { |
|
112 | + foreach ($config->getInterceptors() as $interceptor){ |
|
113 | 113 | $list[] = $this->autowire($interceptor, $container, $factory); |
114 | 114 | } |
115 | 115 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * |
128 | 128 | * @throws ContainerExceptionInterface |
129 | 129 | */ |
130 | - private function autowire(string|object $id, ContainerInterface $container, FactoryInterface $factory): object |
|
130 | + private function autowire(string | object $id, ContainerInterface $container, FactoryInterface $factory): object |
|
131 | 131 | { |
132 | 132 | return match (true) { |
133 | 133 | \is_string($id) => $container->get($id), |
@@ -72,11 +72,13 @@ discard block |
||
72 | 72 | FinalizerInterface $finalizer, |
73 | 73 | ?EventDispatcherInterface $eventDispatcher = null |
74 | 74 | ): void { |
75 | - if ($eventDispatcher !== null) { |
|
75 | + if ($eventDispatcher !== null) |
|
76 | + { |
|
76 | 77 | $this->initEventDispatcher(new Core($eventDispatcher), $config, $container, $factory); |
77 | 78 | } |
78 | 79 | |
79 | - foreach ($config->getProcessors() as $processor) { |
|
80 | + foreach ($config->getProcessors() as $processor) |
|
81 | + { |
|
80 | 82 | $processor = $this->autowire($processor, $container, $factory); |
81 | 83 | |
82 | 84 | \assert($processor instanceof ProcessorInterface); |
@@ -87,7 +89,8 @@ discard block |
||
87 | 89 | $registry->process(); |
88 | 90 | }); |
89 | 91 | |
90 | - if ($finalizer instanceof EventDispatcherAwareInterface && $eventDispatcher !== null) { |
|
92 | + if ($finalizer instanceof EventDispatcherAwareInterface && $eventDispatcher !== null) |
|
93 | + { |
|
91 | 94 | $finalizer->setEventDispatcher($eventDispatcher); |
92 | 95 | } |
93 | 96 | } |
@@ -109,7 +112,8 @@ discard block |
||
109 | 112 | ): void { |
110 | 113 | $builder = new CompatiblePipelineBuilder(); |
111 | 114 | $list = []; |
112 | - foreach ($config->getInterceptors() as $interceptor) { |
|
115 | + foreach ($config->getInterceptors() as $interceptor) |
|
116 | + { |
|
113 | 117 | $list[] = $this->autowire($interceptor, $container, $factory); |
114 | 118 | } |
115 | 119 |