Completed
Push — master ( 843e94...46dd70 )
by Андрей
6s
created
test/phpunit/tests/EntryNameResolverChainFunctionalTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/ResolverByModuleContextMapFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/EntryNameResolverChainFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
Module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
test/phpunit/Bootstrap.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
test/phpunit/files/ContextResolver/vendor/custom-service/module2/Module.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
test/phpunit/files/ContextResolver/config/application.config.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@
 block discarded – undo
30 30
 
31 31
             Module::MODULE_NAME => TestPaths::getPathToModule(),
32 32
 
33
-            Service\Module1\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir() . 'module1',
34
-            Service\Module2\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir() . 'module2',
35
-            Service\Module3\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir() . 'module3',
36
-            Service\Service\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir() . 'service',
37
-
38
-            CustomService\Module1\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir(). 'module1',
39
-            CustomService\Module2\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir() . 'module2',
40
-            CustomService\Module3\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir() . 'module3',
41
-            CustomService\Service\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir() . 'service',
33
+            Service\Module1\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir().'module1',
34
+            Service\Module2\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir().'module2',
35
+            Service\Module3\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir().'module3',
36
+            Service\Service\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestServiceDir().'service',
37
+
38
+            CustomService\Module1\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir().'module1',
39
+            CustomService\Module2\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir().'module2',
40
+            CustomService\Module3\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir().'module3',
41
+            CustomService\Service\Module::MODULE_NAME => TestPaths::getPathToContextResolverTestCustomServiceDir().'service',
42 42
         ],
43 43
         'config_glob_paths' => [
44
-            __DIR__ . '/config/autoload/{{,*.}global,{,*.}local}.php',
44
+            __DIR__.'/config/autoload/{{,*.}global,{,*.}local}.php',
45 45
         ],
46 46
     ]
47 47
 ];
Please login to merge, or discard this patch.
test/phpunit/files/TestPaths.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public static function getPathToModule()
22 22
     {
23
-        return __DIR__ . '/../../../';
23
+        return __DIR__.'/../../../';
24 24
     }
25 25
 
26 26
     /**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public static function getPathToDefaultAppConfig()
32 32
     {
33
-        return  __DIR__ . '/../files/DefaultApp/application.config.php';
33
+        return  __DIR__.'/../files/DefaultApp/application.config.php';
34 34
     }
35 35
 
36 36
     /**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public static function getPathToContextResolverTestServiceDir()
43 43
     {
44
-        return  __DIR__ . '/../files/ContextResolver/vendor/service/';
44
+        return  __DIR__.'/../files/ContextResolver/vendor/service/';
45 45
     }
46 46
 
47 47
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public static function getPathToContextResolverTestCustomServiceDir()
55 55
     {
56
-        return  __DIR__ . '/../files/ContextResolver/vendor/custom-service/';
56
+        return  __DIR__.'/../files/ContextResolver/vendor/custom-service/';
57 57
     }
58 58
 
59 59
 
@@ -64,6 +64,6 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public static function getPathToContextResolverAppConfig()
66 66
     {
67
-        return  __DIR__ . '/../files/ContextResolver/config/application.config.php';
67
+        return  __DIR__.'/../files/ContextResolver/config/application.config.php';
68 68
     }
69 69
 }
Please login to merge, or discard this patch.
test/phpunit/files/DefaultApp/application.config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
             Module::MODULE_NAME => TestPaths::getPathToModule(),
19 19
         ],
20 20
         'config_glob_paths' => [
21
-            __DIR__ . '/config/autoload/{{,*.}global,{,*.}local}.php',
21
+            __DIR__.'/config/autoload/{{,*.}global,{,*.}local}.php',
22 22
         ],
23 23
     ]
24 24
 ];
Please login to merge, or discard this patch.