@@ -45,8 +45,7 @@ discard block |
||
| 45 | 45 | public function emit(string $eventName, array $arguments = []): void |
| 46 | 46 | { |
| 47 | 47 | $this->isCancellingEnabled() === true ? |
| 48 | - $this->emitWithCancellingPropagationCheck($eventName, $arguments) : |
|
| 49 | - $this->emitWithoutCancellingPropagationCheck($eventName, $arguments); |
|
| 48 | + $this->emitWithCancellingPropagationCheck($eventName, $arguments) : $this->emitWithoutCancellingPropagationCheck($eventName, $arguments); |
|
| 50 | 49 | } |
| 51 | 50 | |
| 52 | 51 | /** |
@@ -92,7 +91,7 @@ discard block |
||
| 92 | 91 | } |
| 93 | 92 | |
| 94 | 93 | $eventSubscribers = $this->getEventSubscribers($eventName); |
| 95 | - $eventSubscribers = array_filter($eventSubscribers, function ($curSubscriber) use ($subscriber) { |
|
| 94 | + $eventSubscribers = array_filter($eventSubscribers, function($curSubscriber) use ($subscriber) { |
|
| 96 | 95 | return $curSubscriber !== $subscriber; |
| 97 | 96 | }); |
| 98 | 97 | |
@@ -279,7 +278,7 @@ discard block |
||
| 279 | 278 | * |
| 280 | 279 | * @SuppressWarnings(PHPMD.ElseExpression) |
| 281 | 280 | */ |
| 282 | - private function parseStaticMethod($mightBeCallable): ?ReflectionMethod |
|
| 281 | + private function parseStaticMethod($mightBeCallable): ? ReflectionMethod |
|
| 283 | 282 | { |
| 284 | 283 | // static callable could be in form of 'ClassName::methodName' or ['ClassName', 'methodName'] |
| 285 | 284 | if (is_string($mightBeCallable) === true && |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 36 | 36 | { |
| 37 | - $container[EventEmitterInterface::class] = function (PsrContainerInterface $container): EventEmitterInterface { |
|
| 37 | + $container[EventEmitterInterface::class] = function(PsrContainerInterface $container): EventEmitterInterface { |
|
| 38 | 38 | $emitter = new SimpleEventEmitter(); |
| 39 | 39 | $cacheData = $container->get(SettingsProviderInterface::class)->get(C::class); |
| 40 | 40 | $emitter->setStaticSubscribers($cacheData); |