@@ -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 | } |
@@ -52,7 +52,7 @@ discard block |
||
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 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | return [ |
109 | 109 | 'Zend\Loader\StandardAutoloader' => [ |
110 | 110 | 'namespaces' => [ |
111 | - __NAMESPACE__ => __DIR__ . '/src/', |
|
111 | + __NAMESPACE__ => __DIR__.'/src/', |
|
112 | 112 | ], |
113 | 113 | ], |
114 | 114 | ]; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function getConfig() |
124 | 124 | { |
125 | - return include __DIR__ . '/config/module.config.php'; |
|
125 | + return include __DIR__.'/config/module.config.php'; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | } |
129 | 129 | \ No newline at end of file |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | protected static function initAutoloader() |
41 | 41 | { |
42 | 42 | $vendorPath = static::findParentPath('vendor'); |
43 | - if (is_readable($vendorPath . '/autoload.php')) { |
|
43 | + if (is_readable($vendorPath.'/autoload.php')) { |
|
44 | 44 | |
45 | 45 | /** @noinspection PhpIncludeInspection */ |
46 | - include $vendorPath . '/autoload.php'; |
|
46 | + include $vendorPath.'/autoload.php'; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | if (!class_exists(AutoloaderFactory::class)) { |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | StandardAutoloader::class => [ |
57 | 57 | 'autoregister_zf' => true, |
58 | 58 | 'namespaces' => [ |
59 | - 'Nnx\\EntryNameResolver' => __DIR__ . '/../../src/', |
|
60 | - __NAMESPACE__ => __DIR__ . '/tests/', |
|
61 | - 'Nnx\\EntryNameResolver\\PhpUnit\\TestData' => __DIR__ . '/files' |
|
59 | + 'Nnx\\EntryNameResolver' => __DIR__.'/../../src/', |
|
60 | + __NAMESPACE__ => __DIR__.'/tests/', |
|
61 | + 'Nnx\\EntryNameResolver\\PhpUnit\\TestData' => __DIR__.'/files' |
|
62 | 62 | ] |
63 | 63 | ] |
64 | 64 | ]); |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | { |
78 | 78 | $dir = __DIR__; |
79 | 79 | $previousDir = '.'; |
80 | - while (!is_dir($dir . '/' . $path)) { |
|
80 | + while (!is_dir($dir.'/'.$path)) { |
|
81 | 81 | $dir = dirname($dir); |
82 | 82 | if ($previousDir === $dir) { |
83 | 83 | return false; |
84 | 84 | } |
85 | 85 | $previousDir = $dir; |
86 | 86 | } |
87 | - return $dir . '/' . $path; |
|
87 | + return $dir.'/'.$path; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | return array( |
50 | 50 | 'Zend\Loader\StandardAutoloader' => array( |
51 | 51 | 'namespaces' => array( |
52 | - __NAMESPACE__ => __DIR__ . '/src/', |
|
52 | + __NAMESPACE__ => __DIR__.'/src/', |
|
53 | 53 | ), |
54 | 54 | ), |
55 | 55 | ); |
@@ -63,6 +63,6 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function getConfig() |
65 | 65 | { |
66 | - return include __DIR__ . '/config/module.config.php'; |
|
66 | + return include __DIR__.'/config/module.config.php'; |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | return [ |
67 | 67 | 'Zend\Loader\StandardAutoloader' => [ |
68 | 68 | 'namespaces' => [ |
69 | - __NAMESPACE__ => __DIR__ . '/src/', |
|
69 | + __NAMESPACE__ => __DIR__.'/src/', |
|
70 | 70 | ], |
71 | 71 | ], |
72 | 72 | ]; |
@@ -80,6 +80,6 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function getConfig() |
82 | 82 | { |
83 | - return include __DIR__ . '/config/module.config.php'; |
|
83 | + return include __DIR__.'/config/module.config.php'; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | \ No newline at end of file |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | return array( |
50 | 50 | 'Zend\Loader\StandardAutoloader' => array( |
51 | 51 | 'namespaces' => array( |
52 | - __NAMESPACE__ => __DIR__ . '/src/', |
|
52 | + __NAMESPACE__ => __DIR__.'/src/', |
|
53 | 53 | ), |
54 | 54 | ), |
55 | 55 | ); |
@@ -63,6 +63,6 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function getConfig() |
65 | 65 | { |
66 | - return include __DIR__ . '/config/module.config.php'; |
|
66 | + return include __DIR__.'/config/module.config.php'; |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | return array( |
50 | 50 | 'Zend\Loader\StandardAutoloader' => array( |
51 | 51 | 'namespaces' => array( |
52 | - __NAMESPACE__ => __DIR__ . '/src/', |
|
52 | + __NAMESPACE__ => __DIR__.'/src/', |
|
53 | 53 | ), |
54 | 54 | ), |
55 | 55 | ); |
@@ -63,6 +63,6 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function getConfig() |
65 | 65 | { |
66 | - return include __DIR__ . '/config/module.config.php'; |
|
66 | + return include __DIR__.'/config/module.config.php'; |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | \ No newline at end of file |