@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | private function getOrmCacheLocatorDefinition(Container $container): callable |
| 46 | 46 | { |
| 47 | - return $container->protect(function (string $key, array $options) use ($container) { |
|
| 47 | + return $container->protect(function(string $key, array $options) use ($container) { |
|
| 48 | 48 | $cacheInstanceKey = 'orm.cache.instances.'.$key; |
| 49 | 49 | if (isset($container[$cacheInstanceKey])) { |
| 50 | 50 | return $container[$cacheInstanceKey]; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | private function getOrmCacheFactoryDefinition(Container $container): callable |
| 76 | 76 | { |
| 77 | - return $container->protect(function (string $driver, array $options) use ($container) { |
|
| 77 | + return $container->protect(function(string $driver, array $options) use ($container) { |
|
| 78 | 78 | $cacheFactoryKey = 'doctrine.cache.factory.'.$driver; |
| 79 | 79 | if (!isset($container[$cacheFactoryKey])) { |
| 80 | 80 | throw new \RuntimeException( |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | private function getOrmCacheFactoryApcuDefinition(Container $container): callable |
| 95 | 95 | { |
| 96 | - return $container->protect(function () use ($container) { |
|
| 96 | + return $container->protect(function() use ($container) { |
|
| 97 | 97 | return new ApcuCache(); |
| 98 | 98 | }); |
| 99 | 99 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | private function getOrmCacheFactoryArrayDefinition(Container $container): callable |
| 107 | 107 | { |
| 108 | - return $container->protect(function () use ($container) { |
|
| 108 | + return $container->protect(function() use ($container) { |
|
| 109 | 109 | return new ArrayCache(); |
| 110 | 110 | }); |
| 111 | 111 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | private function getOrmCacheFactoryFilesystemDefinition(Container $container): callable |
| 119 | 119 | { |
| 120 | - return $container->protect(function (array $options) { |
|
| 120 | + return $container->protect(function(array $options) { |
|
| 121 | 121 | if (empty($options['path'])) { |
| 122 | 122 | throw new \RuntimeException('FilesystemCache path not defined'); |
| 123 | 123 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | private function getOrmCacheFactoryMemcachedDefinition(Container $container): callable |
| 140 | 140 | { |
| 141 | - return $container->protect(function (array $options) use ($container) { |
|
| 141 | + return $container->protect(function(array $options) use ($container) { |
|
| 142 | 142 | if (empty($options['host']) || empty($options['port'])) { |
| 143 | 143 | throw new \RuntimeException('Host and port options need to be specified for memcached cache'); |
| 144 | 144 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | private function getOrmCacheFactoryRedisDefinition(Container $container): callable |
| 162 | 162 | { |
| 163 | - return $container->protect(function (array $options) use ($container) { |
|
| 163 | + return $container->protect(function(array $options) use ($container) { |
|
| 164 | 164 | if (empty($options['host']) || empty($options['port'])) { |
| 165 | 165 | throw new \RuntimeException('Host and port options need to be specified for redis cache'); |
| 166 | 166 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | */ |
| 187 | 187 | private function getOrmCacheFactoryXCacheDefinition(Container $container): callable |
| 188 | 188 | { |
| 189 | - return $container->protect(function () use ($container) { |
|
| 189 | + return $container->protect(function() use ($container) { |
|
| 190 | 190 | return new XcacheCache(); |
| 191 | 191 | }); |
| 192 | 192 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | private function getOrmEmsOptionsInitializerDefinition(Container $container): callable |
| 90 | 90 | { |
| 91 | - return $container->protect(function () use ($container) { |
|
| 91 | + return $container->protect(function() use ($container) { |
|
| 92 | 92 | static $initialized = false; |
| 93 | 93 | |
| 94 | 94 | if ($initialized) { |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | private function getOrmEmsDefinition(Container $container): callable |
| 125 | 125 | { |
| 126 | - return function () use ($container) { |
|
| 126 | + return function() use ($container) { |
|
| 127 | 127 | $container['doctrine.orm.ems.options.initializer'](); |
| 128 | 128 | |
| 129 | 129 | $ems = new Container(); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $config = $container['doctrine.orm.ems.config'][$name]; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - $ems[$name] = function () use ($container, $options, $config) { |
|
| 138 | + $ems[$name] = function() use ($container, $options, $config) { |
|
| 139 | 139 | return EntityManager::create( |
| 140 | 140 | $container['doctrine.dbal.dbs'][$options['connection']], |
| 141 | 141 | $config, |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | private function getOrmEmsConfigServiceProvider(Container $container): callable |
| 157 | 157 | { |
| 158 | - return function () use ($container) { |
|
| 158 | + return function() use ($container) { |
|
| 159 | 159 | $container['doctrine.orm.ems.options.initializer'](); |
| 160 | 160 | |
| 161 | 161 | $configs = new Container(); |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | string $name, |
| 180 | 180 | array $options |
| 181 | 181 | ): callable { |
| 182 | - return function () use ($container, $name, $options) { |
|
| 182 | + return function() use ($container, $name, $options) { |
|
| 183 | 183 | $config = new Configuration(); |
| 184 | 184 | |
| 185 | 185 | $config->setProxyDir($container['doctrine.orm.proxies_dir']); |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | */ |
| 240 | 240 | private function getOrmMappingDriverChainDefinition(Container $container): callable |
| 241 | 241 | { |
| 242 | - return $container->protect(function (string $name, Configuration $config, array $mappings) use ($container) { |
|
| 242 | + return $container->protect(function(string $name, Configuration $config, array $mappings) use ($container) { |
|
| 243 | 243 | $container['doctrine.orm.ems.options.initializer'](); |
| 244 | 244 | |
| 245 | 245 | /** @var MappingDriverChain $chain */ |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | */ |
| 277 | 277 | private function getOrmMappingDriverChainFactoryDefinition(Container $container): callable |
| 278 | 278 | { |
| 279 | - return $container->protect(function () use ($container) { |
|
| 279 | + return $container->protect(function() use ($container) { |
|
| 280 | 280 | return new MappingDriverChain(); |
| 281 | 281 | }); |
| 282 | 282 | } |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | */ |
| 289 | 289 | private function getOrmMappingDriverFactoryAnnotation(Container $container): callable |
| 290 | 290 | { |
| 291 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 291 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 292 | 292 | $useSimpleAnnotationReader = $entity['use_simple_annotation_reader'] ?? true; |
| 293 | 293 | |
| 294 | 294 | return $config->newDefaultAnnotationDriver( |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | */ |
| 306 | 306 | private function getOrmMappingDriverFactoryYaml(Container $container): callable |
| 307 | 307 | { |
| 308 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 308 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 309 | 309 | return new YamlDriver($entity['path']); |
| 310 | 310 | }); |
| 311 | 311 | } |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | */ |
| 318 | 318 | private function getOrmMappingDriverFactorySimpleYaml(Container $container): callable |
| 319 | 319 | { |
| 320 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 320 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 321 | 321 | return new SimplifiedYamlDriver([$entity['path'] => $entity['namespace']]); |
| 322 | 322 | }); |
| 323 | 323 | } |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | */ |
| 330 | 330 | private function getOrmMappingDriverFactoryXml(Container $container): callable |
| 331 | 331 | { |
| 332 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 332 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 333 | 333 | return new XmlDriver($entity['path']); |
| 334 | 334 | }); |
| 335 | 335 | } |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | */ |
| 342 | 342 | private function getOrmMappingDriverFactorySimpleXml(Container $container): callable |
| 343 | 343 | { |
| 344 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 344 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 345 | 345 | return new SimplifiedXmlDriver([$entity['path'] => $entity['namespace']]); |
| 346 | 346 | }); |
| 347 | 347 | } |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | */ |
| 354 | 354 | private function getOrmMappingDriverFactoryPhp(Container $container): callable |
| 355 | 355 | { |
| 356 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 356 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 357 | 357 | return new StaticPHPDriver($entity['path']); |
| 358 | 358 | }); |
| 359 | 359 | } |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | */ |
| 366 | 366 | private function getOrmNamingStrategyDefinition(Container $container): callable |
| 367 | 367 | { |
| 368 | - return function () use ($container) { |
|
| 368 | + return function() use ($container) { |
|
| 369 | 369 | return new DefaultNamingStrategy(); |
| 370 | 370 | }; |
| 371 | 371 | } |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | */ |
| 378 | 378 | private function getOrmQuoteStrategyDefinition(Container $container): callable |
| 379 | 379 | { |
| 380 | - return function () use ($container) { |
|
| 380 | + return function() use ($container) { |
|
| 381 | 381 | return new DefaultQuoteStrategy(); |
| 382 | 382 | }; |
| 383 | 383 | } |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | */ |
| 390 | 390 | private function getOrmEntityListenerResolverDefinition(Container $container): callable |
| 391 | 391 | { |
| 392 | - return function () use ($container) { |
|
| 392 | + return function() use ($container) { |
|
| 393 | 393 | return new DefaultEntityListenerResolver(); |
| 394 | 394 | }; |
| 395 | 395 | } |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | */ |
| 402 | 402 | private function getOrmRepositoryFactoryDefinition(Container $container): callable |
| 403 | 403 | { |
| 404 | - return function () use ($container) { |
|
| 404 | + return function() use ($container) { |
|
| 405 | 405 | return new DefaultRepositoryFactory(); |
| 406 | 406 | }; |
| 407 | 407 | } |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | */ |
| 414 | 414 | private function getOrmSecondLevelCacheConfigurationDefinition(Container $container): callable |
| 415 | 415 | { |
| 416 | - return function () use ($container) { |
|
| 416 | + return function() use ($container) { |
|
| 417 | 417 | return new CacheConfiguration(); |
| 418 | 418 | }; |
| 419 | 419 | } |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | */ |
| 426 | 426 | private function getOrmEmDefinition(Container $container): callable |
| 427 | 427 | { |
| 428 | - return function () use ($container) { |
|
| 428 | + return function() use ($container) { |
|
| 429 | 429 | $ems = $container['doctrine.orm.ems']; |
| 430 | 430 | |
| 431 | 431 | return $ems[$container['doctrine.orm.ems.default']]; |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | */ |
| 440 | 440 | private function getOrmEmConfigDefinition(Container $container): callable |
| 441 | 441 | { |
| 442 | - return function () use ($container) { |
|
| 442 | + return function() use ($container) { |
|
| 443 | 443 | $configs = $container['doctrine.orm.ems.config']; |
| 444 | 444 | |
| 445 | 445 | return $configs[$container['doctrine.orm.ems.default']]; |