@@ -52,7 +52,7 @@ |
||
52 | 52 | public function init(ModuleManagerInterface $manager) |
53 | 53 | { |
54 | 54 | if (!$manager instanceof ModuleManager) { |
55 | - $errMsg =sprintf('Module manager not implement %s', ModuleManager::class); |
|
55 | + $errMsg = sprintf('Module manager not implement %s', ModuleManager::class); |
|
56 | 56 | throw new Exception\InvalidArgumentException($errMsg); |
57 | 57 | } |
58 | 58 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | Service\Module3\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir() . 'module3', |
34 | 34 | Service\Service\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir() . 'service', |
35 | 35 | |
36 | - CustomService\Module1\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir(). 'module1', |
|
36 | + CustomService\Module1\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir() . 'module1', |
|
37 | 37 | CustomService\Module2\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir() . 'module2', |
38 | 38 | CustomService\Module3\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir() . 'module3', |
39 | 39 | CustomService\Service\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir() . 'service', |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $mockResolver1->expects(static::once()) |
167 | 167 | ->method('resolveEntryNameByContext') |
168 | 168 | ->with(static::equalTo($entryName), static::equalTo($context)) |
169 | - ->will(static::returnCallback(function () use (&$actualSequence) { |
|
169 | + ->will(static::returnCallback(function() use (&$actualSequence) { |
|
170 | 170 | $actualSequence[] = 1; |
171 | 171 | })); |
172 | 172 | $mockResolverName1 = spl_object_hash($mockResolver1); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $mockResolver2->expects(static::once()) |
177 | 177 | ->method('resolveEntryNameByContext') |
178 | 178 | ->with(static::equalTo($entryName), static::equalTo($context)) |
179 | - ->will(static::returnCallback(function () use (&$actualSequence) { |
|
179 | + ->will(static::returnCallback(function() use (&$actualSequence) { |
|
180 | 180 | $actualSequence[] = 2; |
181 | 181 | })); |
182 | 182 | $mockResolverName2 = spl_object_hash($mockResolver2); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $mockResolver3->expects(static::once()) |
187 | 187 | ->method('resolveEntryNameByContext') |
188 | 188 | ->with(static::equalTo($entryName), static::equalTo($context)) |
189 | - ->will(static::returnCallback(function () use (&$actualSequence) { |
|
189 | + ->will(static::returnCallback(function() use (&$actualSequence) { |
|
190 | 190 | $actualSequence[] = 3; |
191 | 191 | })); |
192 | 192 | $mockResolverName3 = spl_object_hash($mockResolver3); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $mockResolver4->expects(static::once()) |
198 | 198 | ->method('resolveEntryNameByContext') |
199 | 199 | ->with(static::equalTo($entryName), static::equalTo($context)) |
200 | - ->will(static::returnCallback(function () use (&$actualSequence) { |
|
200 | + ->will(static::returnCallback(function() use (&$actualSequence) { |
|
201 | 201 | $actualSequence[] = 4; |
202 | 202 | })); |
203 | 203 | $mockResolverName4 = spl_object_hash($mockResolver4); |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | $mockResolver2->expects(static::once()) |
351 | 351 | ->method('resolveEntryNameByContext') |
352 | 352 | ->with(static::equalTo($entryName), static::equalTo($context)) |
353 | - ->will(static::returnCallback(function () use (&$actualSequence) { |
|
353 | + ->will(static::returnCallback(function() use (&$actualSequence) { |
|
354 | 354 | $actualSequence[] = 2; |
355 | 355 | })); |
356 | 356 | $mockResolverName2 = spl_object_hash($mockResolver2); |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $mockResolver3->expects(static::once()) |
361 | 361 | ->method('resolveEntryNameByContext') |
362 | 362 | ->with(static::equalTo($entryName), static::equalTo($context)) |
363 | - ->will(static::returnCallback(function () use (&$actualSequence) { |
|
363 | + ->will(static::returnCallback(function() use (&$actualSequence) { |
|
364 | 364 | $actualSequence[] = 3; |
365 | 365 | })); |
366 | 366 | $mockResolverName3 = spl_object_hash($mockResolver3); |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | $mockResolver4->expects(static::once()) |
372 | 372 | ->method('resolveEntryNameByContext') |
373 | 373 | ->with(static::equalTo($entryName), static::equalTo($context)) |
374 | - ->will(static::returnCallback(function () use (&$actualSequence) { |
|
374 | + ->will(static::returnCallback(function() use (&$actualSequence) { |
|
375 | 375 | $actualSequence[] = 4; |
376 | 376 | })); |
377 | 377 | $mockResolverName4 = spl_object_hash($mockResolver4); |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | $mockResolver1->expects(static::once()) |
404 | 404 | ->method('resolveEntryNameByContext') |
405 | 405 | ->with(static::equalTo($entryName), static::equalTo($context)) |
406 | - ->will(static::returnCallback(function () use (&$actualSequence) { |
|
406 | + ->will(static::returnCallback(function() use (&$actualSequence) { |
|
407 | 407 | $actualSequence[] = 1; |
408 | 408 | })); |
409 | 409 | $entryNameResolverChain->prependResolver($mockResolver1); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | $contextMap = array_key_exists('contextMap', $options) ? $options['contextMap'] : []; |
59 | 59 | |
60 | - $className = array_key_exists('className', $options) ? (string)$options['className'] : static::$defaultTargetClassName; |
|
60 | + $className = array_key_exists('className', $options) ? (string) $options['className'] : static::$defaultTargetClassName; |
|
61 | 61 | |
62 | 62 | $r = new ReflectionClass($className); |
63 | 63 | $resolverByModuleContextMap = $r->newInstance($moduleOptionsPluginManager); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $resolvers = array_key_exists('resolvers', $options) && is_array($options['resolvers']) ? $options['resolvers'] : []; |
52 | 52 | |
53 | - $className = array_key_exists('className', $options) ? (string)$options['className'] : static::$defaultTargetClassName; |
|
53 | + $className = array_key_exists('className', $options) ? (string) $options['className'] : static::$defaultTargetClassName; |
|
54 | 54 | |
55 | 55 | $r = new ReflectionClass($className); |
56 | 56 | $chain = $r->newInstance(); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | /** @var EntryNameResolverInterface $resolver */ |
84 | 84 | $resolver = $serviceLocator->get($name, $resolverOptions); |
85 | 85 | |
86 | - $priority = array_key_exists('priority', $entryNameResolverConfig) ? (integer)$entryNameResolverConfig['priority'] : EntryNameResolverChain::DEFAULT_PRIORITY; |
|
86 | + $priority = array_key_exists('priority', $entryNameResolverConfig) ? (integer) $entryNameResolverConfig['priority'] : EntryNameResolverChain::DEFAULT_PRIORITY; |
|
87 | 87 | |
88 | 88 | $chain->attach($resolver, $priority); |
89 | 89 | } |