Completed
Push — master ( 6465ed...ccb889 )
by Neomerx
07:33
created
src/SimpleEventEmitter.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Package/EventsContainerConfigurator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
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,12 +50,12 @@  discard block
 block discarded – undo
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
                 return call_user_func($getOrCreateEmitter, $container);
55 55
             };
56 56
 
57 57
         $container[EventDispatcherInterface::class] =
58
-            function (PsrContainerInterface $container) use ($getOrCreateEmitter): EventDispatcherInterface {
58
+            function(PsrContainerInterface $container) use ($getOrCreateEmitter): EventDispatcherInterface {
59 59
                 return call_user_func($getOrCreateEmitter, $container);
60 60
             };
61 61
     }
Please login to merge, or discard this patch.
src/Package/EventSettings.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      * @param iterable $eventClasses
102 102
      * @param iterable $handlerClasses
103 103
      *
104
-     * @return iterable
104
+     * @return \Generator
105 105
      *
106 106
      * @throws ReflectionException
107 107
      */
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     /**
120 120
      * @param string $handlerClass
121 121
      *
122
-     * @return iterable
122
+     * @return \Generator
123 123
      *
124 124
      * @throws ReflectionException
125 125
      */
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      * @param string   $eventClass
140 140
      * @param iterable $eventClasses
141 141
      *
142
-     * @return iterable
142
+     * @return \Generator
143 143
      *
144 144
      * @throws ReflectionException
145 145
      */
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     /**
163 163
      * @param iterable $eventClasses
164 164
      *
165
-     * @return array
165
+     * @return string[]
166 166
      */
167 167
     private function getParentEvents(iterable $eventClasses): array
168 168
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
         $subscribersFileMask = $defaults[static::KEY_SUBSCRIBERS_FILE_MASK] ?? null;
64 64
         assert(empty($subscribersFileMask) === false, "Invalid Subscribers file mask `$subscribersFileMask`.");
65 65
 
66
-        $eventsPath      = $eventsFolder . DIRECTORY_SEPARATOR . $eventsFileMask;
67
-        $subscribersPath = $subscribersFolder . DIRECTORY_SEPARATOR . $subscribersFileMask;
66
+        $eventsPath      = $eventsFolder.DIRECTORY_SEPARATOR.$eventsFileMask;
67
+        $subscribersPath = $subscribersFolder.DIRECTORY_SEPARATOR.$subscribersFileMask;
68 68
 
69 69
         $emitter      = new SimpleEventEmitter();
70 70
         /** @noinspection PhpParamsInspection */
Please login to merge, or discard this patch.