Completed
Push — develop ( a628f2...0a0d90 )
by
unknown
08:45
created
module/Core/src/Core/Factory/EventManager/EventManagerAbstractFactory.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
166 166
     {
167
-        return $this($serviceLocator,$requestedName);
167
+        return $this($serviceLocator, $requestedName);
168 168
     }
169 169
 
170 170
     /**
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $defaults = [
184 184
             'service' => 'EventManager',
185 185
             'configure' => true,
186
-            'identifiers' => [ $name ],
186
+            'identifiers' => [$name],
187 187
             'event' => '\Zend\EventManager\Event',
188 188
             'listeners' => [],
189 189
         ];
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         foreach ($listeners as $name => $options) {
275 275
             $options = $this->normalizeListenerOptions($name, $options);
276 276
 
277
-            if ($options['lazy'] && null !== $options['attach'] ) {
277
+            if ($options['lazy'] && null !== $options['attach']) {
278 278
                 foreach ($options['attach'] as $spec) {
279 279
                     $lazyListeners[] = [
280 280
                         'service' => $options['service'],
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
             }
305 305
 
306 306
             foreach ($options['attach'] as $spec) {
307
-                $callback = $spec['method'] ? [ $listener, $spec['method'] ] : $listener;
307
+                $callback = $spec['method'] ? [$listener, $spec['method']] : $listener;
308 308
                 $eventManager->attach($spec['event'], $callback, $spec['priority']);
309 309
             }
310 310
         }
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 
376 376
         if (is_string($options)) {
377 377
             /* Only an event name is provided in config */
378
-            $normalized['attach'] = [ [ 'event' => $options, 'method' => null, 'priority' => 1 ] ];
378
+            $normalized['attach'] = [['event' => $options, 'method' => null, 'priority' => 1]];
379 379
             return $normalized;
380 380
 
381 381
         }
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             } else if (is_string($opt)) {
405 405
                 if (null === $event) {
406 406
                     /* first string found is assumed to be the event name */
407
-                    $event = [ $opt ];
407
+                    $event = [$opt];
408 408
                 } else {
409 409
                     /* second string found must be a method name. */
410 410
                     $method = $opt;
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
         }
422 422
 
423 423
         foreach ($event as &$eventSpec) {
424
-            $eventSpec = [ 'event' => $eventSpec, 'method' => $method, 'priority' => $priority ];
424
+            $eventSpec = ['event' => $eventSpec, 'method' => $method, 'priority' => $priority];
425 425
         }
426 426
 
427 427
         $normalized['attach'] = $event;
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
     protected function normalizeEventsSpec($options)
434 434
     {
435 435
         $listenerPriority = isset($options['priority']) ? $options['priority'] : 1;
436
-        $listenerMethod   = isset($options['method'])   ? $options['method']   : '__none__';
436
+        $listenerMethod   = isset($options['method']) ? $options['method'] : '__none__';
437 437
         $events = [];
438 438
 
439 439
         foreach ($options['events'] as $event => $spec) {
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
             } else if (is_array($spec)) {
454 454
                 if (isset($spec['method'])) {
455 455
                     if (!is_array($spec['method'])) {
456
-                        $spec['method'] = [ $spec['method'] ];
456
+                        $spec['method'] = [$spec['method']];
457 457
                     }
458 458
 
459 459
                     foreach ($spec['method'] as $method => $methodPriority) {
Please login to merge, or discard this patch.