@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function canCreateServiceWithName(ServiceLocatorInterface $services, $name, $requestedName) |
| 86 | 86 | { |
| 87 | - return $this->canCreate($services,$requestedName); |
|
| 87 | + return $this->canCreate($services, $requestedName); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function createServiceWithName(ServiceLocatorInterface $services, $name, $requestedName) |
| 99 | 99 | { |
| 100 | - return $this($services,$requestedName); |
|
| 100 | + return $this($services, $requestedName); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -164,7 +164,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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['events'], $callback, $spec['priority']); |
| 309 | 309 | } |
| 310 | 310 | } |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | |
| 376 | 376 | if (is_string($options)) { |
| 377 | 377 | /* Only an event name is provided in config */ |
| 378 | - $normalized['attach'] = [ [ 'events' => [ $options ], 'method' => null, 'priority' => 0 ] ]; |
|
| 378 | + $normalized['attach'] = [['events' => [$options], 'method' => null, 'priority' => 0]]; |
|
| 379 | 379 | return $normalized; |
| 380 | 380 | |
| 381 | 381 | } |
@@ -404,7 +404,7 @@ discard block |
||
| 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; |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | - $normalized['attach'] = [ [ 'events' => $event, 'method' => $method, 'priority' => $priority ] ]; |
|
| 423 | + $normalized['attach'] = [['events' => $event, 'method' => $method, 'priority' => $priority]]; |
|
| 424 | 424 | $normalized['lazy'] = $lazy; |
| 425 | 425 | |
| 426 | 426 | return $normalized; |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | protected function normalizeEventsSpec($options) |
| 430 | 430 | { |
| 431 | 431 | $listenerPriority = isset($options['priority']) ? $options['priority'] : 0; |
| 432 | - $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
| 432 | + $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
| 433 | 433 | $events = []; |
| 434 | 434 | |
| 435 | 435 | foreach ($options['events'] as $event => $spec) { |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | } else if (is_array($spec)) { |
| 450 | 450 | if (isset($spec['method'])) { |
| 451 | 451 | if (!is_array($spec['method'])) { |
| 452 | - $spec['method'] = [ $spec['method'] ]; |
|
| 452 | + $spec['method'] = [$spec['method']]; |
|
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | foreach ($spec['method'] as $method => $methodPriority) { |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | */ |
| 146 | 146 | public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
| 147 | 147 | { |
| 148 | - return $this($serviceLocator,$requestedName); |
|
| 148 | + return $this($serviceLocator,$requestedName); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /** |
@@ -81,10 +81,10 @@ discard block |
||
| 81 | 81 | $queryBuilder->find($this->getEntityClassName($requestedName)); |
| 82 | 82 | |
| 83 | 83 | $filterManager = $services->get('FilterManager'); |
| 84 | - $filterName = 'PaginationQuery/' . $requestedName; |
|
| 84 | + $filterName = 'PaginationQuery/'.$requestedName; |
|
| 85 | 85 | |
| 86 | 86 | if ($filterManager->has($filterName)) { |
| 87 | - $filter = $filterManager->get('PaginationQuery/' . $requestedName); |
|
| 87 | + $filter = $filterManager->get('PaginationQuery/'.$requestedName); |
|
| 88 | 88 | $queryBuilder = $filter->filter($this->options, $queryBuilder); |
| 89 | 89 | } |
| 90 | 90 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * @param array|null $options |
| 109 | 109 | * @return bool |
| 110 | 110 | */ |
| 111 | - public function canCreate(ContainerInterface $container, $requestedName, array $options=null) |
|
| 111 | + public function canCreate(ContainerInterface $container, $requestedName, array $options = null) |
|
| 112 | 112 | { |
| 113 | 113 | $class = $this->getEntityClassName($requestedName); |
| 114 | 114 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
| 133 | 133 | { |
| 134 | - return $this->canCreate($serviceLocator,$requestedName); |
|
| 134 | + return $this->canCreate($serviceLocator, $requestedName); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
| 147 | 147 | { |
| 148 | - return $this($serviceLocator,$requestedName); |
|
| 148 | + return $this($serviceLocator, $requestedName); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /** |