@@ -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 | |
@@ -75,8 +75,8 @@ |
||
| 75 | 75 | $subscribersFileMask = $defaults[static::KEY_SUBSCRIBERS_FILE_MASK] ?? null; |
| 76 | 76 | assert(empty($subscribersFileMask) === false, "Invalid Subscribers file mask `$subscribersFileMask`."); |
| 77 | 77 | |
| 78 | - $eventsPath = $eventsFolder . DIRECTORY_SEPARATOR . $eventsFileMask; |
|
| 79 | - $subscribersPath = $subscribersFolder . DIRECTORY_SEPARATOR . $subscribersFileMask; |
|
| 78 | + $eventsPath = $eventsFolder.DIRECTORY_SEPARATOR.$eventsFileMask; |
|
| 79 | + $subscribersPath = $subscribersFolder.DIRECTORY_SEPARATOR.$subscribersFileMask; |
|
| 80 | 80 | |
| 81 | 81 | $emitter = new SimpleEventEmitter(); |
| 82 | 82 | $eventClasses = iterator_to_array( |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 40 | 40 | { |
| 41 | 41 | $emitter = null; |
| 42 | - $getOrCreateEmitter = function (PsrContainerInterface $container) use (&$emitter): SimpleEventEmitter { |
|
| 42 | + $getOrCreateEmitter = function(PsrContainerInterface $container) use (&$emitter): SimpleEventEmitter { |
|
| 43 | 43 | if ($emitter === null) { |
| 44 | 44 | $emitter = new SimpleEventEmitter(); |
| 45 | 45 | $cacheData = $container->get(SettingsProviderInterface::class)->get(C::class)[C::KEY_CACHED_DATA]; |
@@ -50,13 +50,13 @@ discard block |
||
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | 52 | $container[EventEmitterInterface::class] = |
| 53 | - function (PsrContainerInterface $container) use ($getOrCreateEmitter): EventEmitterInterface |
|
| 53 | + function(PsrContainerInterface $container) use ($getOrCreateEmitter): EventEmitterInterface |
|
| 54 | 54 | { |
| 55 | 55 | return call_user_func($getOrCreateEmitter, $container); |
| 56 | 56 | }; |
| 57 | 57 | |
| 58 | 58 | $container[EventDispatcherInterface::class] = |
| 59 | - function (PsrContainerInterface $container) use ($getOrCreateEmitter): EventDispatcherInterface |
|
| 59 | + function(PsrContainerInterface $container) use ($getOrCreateEmitter): EventDispatcherInterface |
|
| 60 | 60 | { |
| 61 | 61 | return call_user_func($getOrCreateEmitter, $container); |
| 62 | 62 | }; |