@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | private function getLoggerDefinition(Container $container): \Closure |
| 42 | 42 | { |
| 43 | - return function () use ($container) { |
|
| 43 | + return function() use ($container) { |
|
| 44 | 44 | return $container['monolog']; |
| 45 | 45 | }; |
| 46 | 46 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | private function getMonologDefinition(Container $container): \Closure |
| 54 | 54 | { |
| 55 | - return function ($container) { |
|
| 55 | + return function($container) { |
|
| 56 | 56 | $log = new Logger($container['monolog.name']); |
| 57 | 57 | $log->pushHandler(new GroupHandler($container['monolog.handlers'])); |
| 58 | 58 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | private function getMonologFormatterDefinition(Container $container): \Closure |
| 69 | 69 | { |
| 70 | - return function () { |
|
| 70 | + return function() { |
|
| 71 | 71 | return new LineFormatter(); |
| 72 | 72 | }; |
| 73 | 73 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | private function getMonologHandlersDefinition(Container $container): \Closure |
| 81 | 81 | { |
| 82 | - return function () use ($container) { |
|
| 82 | + return function() use ($container) { |
|
| 83 | 83 | return [$container['monolog.default_handler']]; |
| 84 | 84 | }; |
| 85 | 85 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | private function getMonologDefaultHandlerDefinition(Container $container): \Closure |
| 93 | 93 | { |
| 94 | - return function () use ($container) { |
|
| 94 | + return function() use ($container) { |
|
| 95 | 95 | $handler = new StreamHandler( |
| 96 | 96 | $container['monolog.logfile'], |
| 97 | 97 | $container['monolog.level'], |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $container['orm.mapping_driver_chain.locator'] = $this->getOrmMappingDriverChainLocatorDefinition($container); |
| 62 | 62 | $container['orm.mapping_driver_chain.factory'] = $this->getOrmMappingDriverChainFactoryDefinition($container); |
| 63 | 63 | |
| 64 | - $container['orm.add_mapping_driver'] = $container->protect(function (MappingDriver $mappingDriver, $namespace, $name = null) use ($container) { |
|
| 64 | + $container['orm.add_mapping_driver'] = $container->protect(function(MappingDriver $mappingDriver, $namespace, $name = null) use ($container) { |
|
| 65 | 65 | $container['orm.ems.options.initializer'](); |
| 66 | 66 | |
| 67 | 67 | if (null === $name) { |
@@ -73,29 +73,29 @@ discard block |
||
| 73 | 73 | $driverChain->addDriver($mappingDriver, $namespace); |
| 74 | 74 | }); |
| 75 | 75 | |
| 76 | - $container['orm.strategy.naming'] = function ($container) { |
|
| 76 | + $container['orm.strategy.naming'] = function($container) { |
|
| 77 | 77 | return new DefaultNamingStrategy(); |
| 78 | 78 | }; |
| 79 | 79 | |
| 80 | - $container['orm.strategy.quote'] = function ($container) { |
|
| 80 | + $container['orm.strategy.quote'] = function($container) { |
|
| 81 | 81 | return new DefaultQuoteStrategy(); |
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | - $container['orm.entity_listener_resolver'] = function ($container) { |
|
| 84 | + $container['orm.entity_listener_resolver'] = function($container) { |
|
| 85 | 85 | return new DefaultEntityListenerResolver(); |
| 86 | 86 | }; |
| 87 | 87 | |
| 88 | - $container['orm.repository_factory'] = function ($container) { |
|
| 88 | + $container['orm.repository_factory'] = function($container) { |
|
| 89 | 89 | return new DefaultRepositoryFactory(); |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | - $container['orm.em'] = function ($container) { |
|
| 92 | + $container['orm.em'] = function($container) { |
|
| 93 | 93 | $ems = $container['orm.ems']; |
| 94 | 94 | |
| 95 | 95 | return $ems[$container['orm.ems.default']]; |
| 96 | 96 | }; |
| 97 | 97 | |
| 98 | - $container['orm.em.config'] = function ($container) { |
|
| 98 | + $container['orm.em.config'] = function($container) { |
|
| 99 | 99 | $configs = $container['orm.ems.config']; |
| 100 | 100 | |
| 101 | 101 | return $configs[$container['orm.ems.default']]; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | private function getOrmEmsOptionsInitializerDefinition(Container $container): \Closure |
| 134 | 134 | { |
| 135 | - return $container->protect(function () use ($container) { |
|
| 135 | + return $container->protect(function() use ($container) { |
|
| 136 | 136 | static $initialized = false; |
| 137 | 137 | |
| 138 | 138 | if ($initialized) { |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | private function getOrmEmNameFromParamKeyDefinition(Container $container): \Closure |
| 169 | 169 | { |
| 170 | - return $container->protect(function ($paramKey) use ($container) { |
|
| 170 | + return $container->protect(function($paramKey) use ($container) { |
|
| 171 | 171 | $container['orm.ems.options.initializer'](); |
| 172 | 172 | |
| 173 | 173 | if (isset($container[$paramKey])) { |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | private function getOrmEmsDefinition(Container $container): \Closure |
| 187 | 187 | { |
| 188 | - return function () use ($container) { |
|
| 188 | + return function() use ($container) { |
|
| 189 | 189 | $container['orm.ems.options.initializer'](); |
| 190 | 190 | |
| 191 | 191 | $ems = new Container(); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $config = $container['orm.ems.config'][$name]; |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - $ems[$name] = function ($ems) use ($container, $options, $config) { |
|
| 200 | + $ems[$name] = function($ems) use ($container, $options, $config) { |
|
| 201 | 201 | return EntityManager::create( |
| 202 | 202 | $container['dbs'][$options['connection']], |
| 203 | 203 | $config, |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | */ |
| 218 | 218 | private function getOrmEmsConfigServiceProvider(Container $container): \Closure |
| 219 | 219 | { |
| 220 | - return function () use ($container) { |
|
| 220 | + return function() use ($container) { |
|
| 221 | 221 | $container['orm.ems.options.initializer'](); |
| 222 | 222 | |
| 223 | 223 | $configs = new Container(); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | */ |
| 320 | 320 | private function getOrmCacheConfigurerDefinition(Container $container): \Closure |
| 321 | 321 | { |
| 322 | - return $container->protect(function ($name, Configuration $config, $options) use ($container) { |
|
| 322 | + return $container->protect(function($name, Configuration $config, $options) use ($container) { |
|
| 323 | 323 | $config->setMetadataCacheImpl($container['orm.cache.locator']($name, 'metadata', $options)); |
| 324 | 324 | $config->setQueryCacheImpl($container['orm.cache.locator']($name, 'query', $options)); |
| 325 | 325 | $config->setResultCacheImpl($container['orm.cache.locator']($name, 'result', $options)); |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | */ |
| 335 | 335 | private function getOrmCacheLocatorDefinition(Container $container): \Closure |
| 336 | 336 | { |
| 337 | - return $container->protect(function ($name, $cacheName, $options) use ($container) { |
|
| 337 | + return $container->protect(function($name, $cacheName, $options) use ($container) { |
|
| 338 | 338 | $cacheNameKey = $cacheName.'_cache'; |
| 339 | 339 | |
| 340 | 340 | if (!isset($options[$cacheNameKey])) { |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | */ |
| 376 | 376 | private function getOrmCacheFactoryApcuDefinition(Container $container): \Closure |
| 377 | 377 | { |
| 378 | - return $container->protect(function () use ($container) { |
|
| 378 | + return $container->protect(function() use ($container) { |
|
| 379 | 379 | return new ApcuCache(); |
| 380 | 380 | }); |
| 381 | 381 | } |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | */ |
| 388 | 388 | private function getOrmCacheFactoryArrayDefinition(Container $container): \Closure |
| 389 | 389 | { |
| 390 | - return $container->protect(function () use ($container) { |
|
| 390 | + return $container->protect(function() use ($container) { |
|
| 391 | 391 | return new ArrayCache(); |
| 392 | 392 | }); |
| 393 | 393 | } |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | */ |
| 400 | 400 | private function getOrmCacheFactoryFilesystemDefinition(Container $container): \Closure |
| 401 | 401 | { |
| 402 | - return $container->protect(function ($cacheOptions) { |
|
| 402 | + return $container->protect(function($cacheOptions) { |
|
| 403 | 403 | if (empty($cacheOptions['path'])) { |
| 404 | 404 | throw new \RuntimeException('FilesystemCache path not defined'); |
| 405 | 405 | } |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | */ |
| 421 | 421 | private function getOrmCacheFactoryMemcacheDefinition(Container $container): \Closure |
| 422 | 422 | { |
| 423 | - return $container->protect(function ($cacheOptions) use ($container) { |
|
| 423 | + return $container->protect(function($cacheOptions) use ($container) { |
|
| 424 | 424 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
| 425 | 425 | throw new \RuntimeException('Host and port options need to be specified for memcache cache'); |
| 426 | 426 | } |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | */ |
| 443 | 443 | private function getOrmCacheFactoryMemcachedDefinition(Container $container): \Closure |
| 444 | 444 | { |
| 445 | - return $container->protect(function ($cacheOptions) use ($container) { |
|
| 445 | + return $container->protect(function($cacheOptions) use ($container) { |
|
| 446 | 446 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
| 447 | 447 | throw new \RuntimeException('Host and port options need to be specified for memcached cache'); |
| 448 | 448 | } |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | */ |
| 465 | 465 | private function getOrmCacheFactoryRedisDefinition(Container $container): \Closure |
| 466 | 466 | { |
| 467 | - return $container->protect(function ($cacheOptions) use ($container) { |
|
| 467 | + return $container->protect(function($cacheOptions) use ($container) { |
|
| 468 | 468 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
| 469 | 469 | throw new \RuntimeException('Host and port options need to be specified for redis cache'); |
| 470 | 470 | } |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | */ |
| 491 | 491 | private function getOrmCacheFactoryXCacheDefinition(Container $container): \Closure |
| 492 | 492 | { |
| 493 | - return $container->protect(function () use ($container) { |
|
| 493 | + return $container->protect(function() use ($container) { |
|
| 494 | 494 | return new XcacheCache(); |
| 495 | 495 | }); |
| 496 | 496 | } |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | */ |
| 503 | 503 | private function getOrmCacheFactoryDefinition(Container $container): \Closure |
| 504 | 504 | { |
| 505 | - return $container->protect(function ($driver, $cacheOptions) use ($container) { |
|
| 505 | + return $container->protect(function($driver, $cacheOptions) use ($container) { |
|
| 506 | 506 | $cacheFactoryKey = 'orm.cache.factory.'.$driver; |
| 507 | 507 | if (!isset($container[$cacheFactoryKey])) { |
| 508 | 508 | throw new \RuntimeException( |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | */ |
| 522 | 522 | private function getOrmMappingDriverChainLocatorDefinition(Container $container): \Closure |
| 523 | 523 | { |
| 524 | - return $container->protect(function ($name = null) use ($container) { |
|
| 524 | + return $container->protect(function($name = null) use ($container) { |
|
| 525 | 525 | $container['orm.ems.options.initializer'](); |
| 526 | 526 | |
| 527 | 527 | if (null === $name) { |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | */ |
| 545 | 545 | private function getOrmMappingDriverChainFactoryDefinition(Container $container): \Closure |
| 546 | 546 | { |
| 547 | - return $container->protect(function () use ($container) { |
|
| 547 | + return $container->protect(function() use ($container) { |
|
| 548 | 548 | return new MappingDriverChain(); |
| 549 | 549 | }); |
| 550 | 550 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | private function getMongoDbsOptionsInitializerDefinition(Container $container): \Closure |
| 51 | 51 | { |
| 52 | - return $container->protect(function () use ($container) { |
|
| 52 | + return $container->protect(function() use ($container) { |
|
| 53 | 53 | static $initialized = false; |
| 54 | 54 | |
| 55 | 55 | if ($initialized) { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | private function getMongoDbsDefinition(Container $container): \Closure |
| 86 | 86 | { |
| 87 | - return function () use ($container) { |
|
| 87 | + return function() use ($container) { |
|
| 88 | 88 | $container['mongodbs.options.initializer'](); |
| 89 | 89 | |
| 90 | 90 | $mongodbs = new Container(); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $manager = $container['mongodbs.event_manager'][$name]; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - $mongodbs[$name] = function () use ($options, $config, $manager) { |
|
| 101 | + $mongodbs[$name] = function() use ($options, $config, $manager) { |
|
| 102 | 102 | return new Connection($options['server'], $options['options'], $config, $manager); |
| 103 | 103 | }; |
| 104 | 104 | } |
@@ -114,14 +114,14 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | private function getMongoDbsConfigDefinition(Container $container): \Closure |
| 116 | 116 | { |
| 117 | - return function () use ($container) { |
|
| 117 | + return function() use ($container) { |
|
| 118 | 118 | $container['mongodbs.options.initializer'](); |
| 119 | 119 | |
| 120 | 120 | $configs = new Container(); |
| 121 | 121 | |
| 122 | 122 | $addLogger = isset($container['logger']) && null !== $container['logger']; |
| 123 | 123 | foreach ($container['mongodbs.options'] as $name => $options) { |
| 124 | - $configs[$name] = function () use ($addLogger, $container) { |
|
| 124 | + $configs[$name] = function() use ($addLogger, $container) { |
|
| 125 | 125 | $config = new Configuration(); |
| 126 | 126 | if ($addLogger) { |
| 127 | 127 | $logger = new DoctrineMongoDbLogger( |
@@ -147,12 +147,12 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | private function getMongoDbsEventManagerDefinition(Container $container): \Closure |
| 149 | 149 | { |
| 150 | - return function () use ($container) { |
|
| 150 | + return function() use ($container) { |
|
| 151 | 151 | $container['mongodbs.options.initializer'](); |
| 152 | 152 | |
| 153 | 153 | $managers = new Container(); |
| 154 | 154 | foreach ($container['mongodbs.options'] as $name => $options) { |
| 155 | - $managers[$name] = function () { |
|
| 155 | + $managers[$name] = function() { |
|
| 156 | 156 | return new EventManager(); |
| 157 | 157 | }; |
| 158 | 158 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | private function getMongoDbDefinition(Container $container): \Closure |
| 169 | 169 | { |
| 170 | - return function () use ($container) { |
|
| 170 | + return function() use ($container) { |
|
| 171 | 171 | $dbs = $container['mongodbs']; |
| 172 | 172 | |
| 173 | 173 | return $dbs[$container['mongodbs.default']]; |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | private function getMongoDbConfigDefinition(Container $container): \Closure |
| 182 | 182 | { |
| 183 | - return function () use ($container) { |
|
| 183 | + return function() use ($container) { |
|
| 184 | 184 | $dbs = $container['mongodbs.config']; |
| 185 | 185 | |
| 186 | 186 | return $dbs[$container['mongodbs.default']]; |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | */ |
| 194 | 194 | private function getMongoDbEventManagerDefinition(Container $container): \Closure |
| 195 | 195 | { |
| 196 | - return function () use ($container) { |
|
| 196 | + return function() use ($container) { |
|
| 197 | 197 | $dbs = $container['mongodbs.event_manager']; |
| 198 | 198 | |
| 199 | 199 | return $dbs[$container['mongodbs.default']]; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | private function getDbsOptionsInitializerDefinition(Container $container): \Closure |
| 55 | 55 | { |
| 56 | - return $container->protect(function () use ($container) { |
|
| 56 | + return $container->protect(function() use ($container) { |
|
| 57 | 57 | static $initialized = false; |
| 58 | 58 | |
| 59 | 59 | if ($initialized) { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | private function getDbsDefinition(Container $container): \Closure |
| 90 | 90 | { |
| 91 | - return function () use ($container) { |
|
| 91 | + return function() use ($container) { |
|
| 92 | 92 | $container['dbs.options.initializer'](); |
| 93 | 93 | |
| 94 | 94 | $dbs = new Container(); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $manager = $container['dbs.event_manager'][$name]; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | - $dbs[$name] = function () use ($options, $config, $manager) { |
|
| 105 | + $dbs[$name] = function() use ($options, $config, $manager) { |
|
| 106 | 106 | return DriverManager::getConnection($options, $config, $manager); |
| 107 | 107 | }; |
| 108 | 108 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | */ |
| 119 | 119 | private function getDbsConfigDefinition(Container $container): \Closure |
| 120 | 120 | { |
| 121 | - return function () use ($container) { |
|
| 121 | + return function() use ($container) { |
|
| 122 | 122 | $container['dbs.options.initializer'](); |
| 123 | 123 | |
| 124 | 124 | $addLogger = isset($container['logger']) && null !== $container['logger'] |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $configs = new Container(); |
| 129 | 129 | foreach ($container['dbs.options'] as $name => $options) { |
| 130 | - $configs[$name] = function () use ($addLogger, $container, $stopwatch) { |
|
| 130 | + $configs[$name] = function() use ($addLogger, $container, $stopwatch) { |
|
| 131 | 131 | $config = new Configuration(); |
| 132 | 132 | if ($addLogger) { |
| 133 | 133 | $config->setSQLLogger( |
@@ -150,12 +150,12 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | private function getDbsEventManagerDefinition(Container $container): \Closure |
| 152 | 152 | { |
| 153 | - return function () use ($container) { |
|
| 153 | + return function() use ($container) { |
|
| 154 | 154 | $container['dbs.options.initializer'](); |
| 155 | 155 | |
| 156 | 156 | $managers = new Container(); |
| 157 | 157 | foreach ($container['dbs.options'] as $name => $options) { |
| 158 | - $managers[$name] = function () { |
|
| 158 | + $managers[$name] = function() { |
|
| 159 | 159 | return new EventManager(); |
| 160 | 160 | }; |
| 161 | 161 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | private function getDbDefinition(Container $container): \Closure |
| 172 | 172 | { |
| 173 | - return function () use ($container) { |
|
| 173 | + return function() use ($container) { |
|
| 174 | 174 | $dbs = $container['dbs']; |
| 175 | 175 | |
| 176 | 176 | return $dbs[$container['dbs.default']]; |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | private function getDbConfigDefinition(Container $container): \Closure |
| 185 | 185 | { |
| 186 | - return function () use ($container) { |
|
| 186 | + return function() use ($container) { |
|
| 187 | 187 | $dbs = $container['dbs.config']; |
| 188 | 188 | |
| 189 | 189 | return $dbs[$container['dbs.default']]; |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | */ |
| 197 | 197 | private function getDbEventManagerDefinition(Container $container): \Closure |
| 198 | 198 | { |
| 199 | - return function () use ($container) { |
|
| 199 | + return function() use ($container) { |
|
| 200 | 200 | $dbs = $container['dbs.event_manager']; |
| 201 | 201 | |
| 202 | 202 | return $dbs[$container['dbs.default']]; |