@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | private function getOrmEmsOptionsInitializerDefinition(Container $container): \Closure |
| 107 | 107 | { |
| 108 | - return $container->protect(function () use ($container) { |
|
| 108 | + return $container->protect(function() use ($container) { |
|
| 109 | 109 | static $initialized = false; |
| 110 | 110 | |
| 111 | 111 | if ($initialized) { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | private function getOrmEmsDefinition(Container $container): \Closure |
| 142 | 142 | { |
| 143 | - return function () use ($container) { |
|
| 143 | + return function() use ($container) { |
|
| 144 | 144 | $container['orm.ems.options.initializer'](); |
| 145 | 145 | |
| 146 | 146 | $ems = new Container(); |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $config = $container['orm.ems.config'][$name]; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - $ems[$name] = function () use ($container, $options, $config) { |
|
| 155 | + $ems[$name] = function() use ($container, $options, $config) { |
|
| 156 | 156 | return EntityManager::create( |
| 157 | 157 | $container['dbs'][$options['connection']], |
| 158 | 158 | $config, |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | private function getOrmEmsConfigServiceProvider(Container $container): \Closure |
| 174 | 174 | { |
| 175 | - return function () use ($container) { |
|
| 175 | + return function() use ($container) { |
|
| 176 | 176 | $container['orm.ems.options.initializer'](); |
| 177 | 177 | |
| 178 | 178 | $configs = new Container(); |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | string $name, |
| 197 | 197 | array $options |
| 198 | 198 | ): \Closure { |
| 199 | - return function () use ($container, $name, $options) { |
|
| 199 | + return function() use ($container, $name, $options) { |
|
| 200 | 200 | $config = new Configuration(); |
| 201 | 201 | |
| 202 | 202 | $config->setProxyDir($container['orm.proxies_dir']); |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | */ |
| 249 | 249 | private function getOrmMappingDriverChainDefinition(Container $container): \Closure |
| 250 | 250 | { |
| 251 | - return $container->protect(function (string $name, Configuration $config, array $mappings) use ($container) { |
|
| 251 | + return $container->protect(function(string $name, Configuration $config, array $mappings) use ($container) { |
|
| 252 | 252 | $container['orm.ems.options.initializer'](); |
| 253 | 253 | |
| 254 | 254 | $cacheInstanceKey = 'orm.mapping_driver_chain.instances.'.$name; |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | */ |
| 291 | 291 | private function getOrmMappingDriverChainFactoryDefinition(Container $container): \Closure |
| 292 | 292 | { |
| 293 | - return $container->protect(function () use ($container) { |
|
| 293 | + return $container->protect(function() use ($container) { |
|
| 294 | 294 | return new MappingDriverChain(); |
| 295 | 295 | }); |
| 296 | 296 | } |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | private function getOrmMappingDriverFactoryAnnotation(Container $container): \Closure |
| 304 | 304 | { |
| 305 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 305 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 306 | 306 | $useSimpleAnnotationReader = $entity['use_simple_annotation_reader'] ?? true; |
| 307 | 307 | |
| 308 | 308 | return $config->newDefaultAnnotationDriver( |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | */ |
| 320 | 320 | private function getOrmMappingDriverFactoryYaml(Container $container): \Closure |
| 321 | 321 | { |
| 322 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 322 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 323 | 323 | return new YamlDriver($entity['path']); |
| 324 | 324 | }); |
| 325 | 325 | } |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | */ |
| 332 | 332 | private function getOrmMappingDriverFactorySimpleYaml(Container $container): \Closure |
| 333 | 333 | { |
| 334 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 334 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 335 | 335 | return new SimplifiedYamlDriver([$entity['path'] => $entity['namespace']]); |
| 336 | 336 | }); |
| 337 | 337 | } |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | */ |
| 344 | 344 | private function getOrmMappingDriverFactoryXml(Container $container): \Closure |
| 345 | 345 | { |
| 346 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 346 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 347 | 347 | return new XmlDriver($entity['path']); |
| 348 | 348 | }); |
| 349 | 349 | } |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | */ |
| 356 | 356 | private function getOrmMappingDriverFactorySimpleXml(Container $container): \Closure |
| 357 | 357 | { |
| 358 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 358 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 359 | 359 | return new SimplifiedXmlDriver([$entity['path'] => $entity['namespace']]); |
| 360 | 360 | }); |
| 361 | 361 | } |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | */ |
| 368 | 368 | private function getOrmMappingDriverFactoryPhp(Container $container): \Closure |
| 369 | 369 | { |
| 370 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 370 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 371 | 371 | return new StaticPHPDriver($entity['path']); |
| 372 | 372 | }); |
| 373 | 373 | } |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | */ |
| 380 | 380 | private function getOrmCacheLocatorDefinition(Container $container): \Closure |
| 381 | 381 | { |
| 382 | - return $container->protect(function (string $name, string $cacheName, array $options) use ($container) { |
|
| 382 | + return $container->protect(function(string $name, string $cacheName, array $options) use ($container) { |
|
| 383 | 383 | $cacheNameKey = $cacheName.'_cache'; |
| 384 | 384 | |
| 385 | 385 | if (!isset($options[$cacheNameKey])) { |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | */ |
| 421 | 421 | private function getOrmCacheFactoryDefinition(Container $container): \Closure |
| 422 | 422 | { |
| 423 | - return $container->protect(function (string $driver, array $cacheOptions) use ($container) { |
|
| 423 | + return $container->protect(function(string $driver, array $cacheOptions) use ($container) { |
|
| 424 | 424 | $cacheFactoryKey = 'orm.cache.factory.'.$driver; |
| 425 | 425 | if (!isset($container[$cacheFactoryKey])) { |
| 426 | 426 | throw new \RuntimeException( |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | */ |
| 440 | 440 | private function getOrmCacheFactoryApcuDefinition(Container $container): \Closure |
| 441 | 441 | { |
| 442 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 442 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 443 | 443 | return new ApcuCache(); |
| 444 | 444 | }); |
| 445 | 445 | } |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | */ |
| 452 | 452 | private function getOrmCacheFactoryArrayDefinition(Container $container): \Closure |
| 453 | 453 | { |
| 454 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 454 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 455 | 455 | return new ArrayCache(); |
| 456 | 456 | }); |
| 457 | 457 | } |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | */ |
| 464 | 464 | private function getOrmCacheFactoryFilesystemDefinition(Container $container): \Closure |
| 465 | 465 | { |
| 466 | - return $container->protect(function (array $cacheOptions) { |
|
| 466 | + return $container->protect(function(array $cacheOptions) { |
|
| 467 | 467 | if (empty($cacheOptions['path'])) { |
| 468 | 468 | throw new \RuntimeException('FilesystemCache path not defined'); |
| 469 | 469 | } |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | */ |
| 485 | 485 | private function getOrmCacheFactoryMemcacheDefinition(Container $container): \Closure |
| 486 | 486 | { |
| 487 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 487 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 488 | 488 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
| 489 | 489 | throw new \RuntimeException('Host and port options need to be specified for memcache cache'); |
| 490 | 490 | } |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | */ |
| 507 | 507 | private function getOrmCacheFactoryMemcachedDefinition(Container $container): \Closure |
| 508 | 508 | { |
| 509 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 509 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 510 | 510 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
| 511 | 511 | throw new \RuntimeException('Host and port options need to be specified for memcached cache'); |
| 512 | 512 | } |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | */ |
| 529 | 529 | private function getOrmCacheFactoryRedisDefinition(Container $container): \Closure |
| 530 | 530 | { |
| 531 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 531 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 532 | 532 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
| 533 | 533 | throw new \RuntimeException('Host and port options need to be specified for redis cache'); |
| 534 | 534 | } |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | */ |
| 555 | 555 | private function getOrmCacheFactoryXCacheDefinition(Container $container): \Closure |
| 556 | 556 | { |
| 557 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 557 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 558 | 558 | return new XcacheCache(); |
| 559 | 559 | }); |
| 560 | 560 | } |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | */ |
| 567 | 567 | private function getOrmNamingStrategyDefinition(Container $container): \Closure |
| 568 | 568 | { |
| 569 | - return function () use ($container) { |
|
| 569 | + return function() use ($container) { |
|
| 570 | 570 | return new DefaultNamingStrategy(); |
| 571 | 571 | }; |
| 572 | 572 | } |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | */ |
| 579 | 579 | private function getOrmQuoteStrategyDefinition(Container $container): \Closure |
| 580 | 580 | { |
| 581 | - return function () use ($container) { |
|
| 581 | + return function() use ($container) { |
|
| 582 | 582 | return new DefaultQuoteStrategy(); |
| 583 | 583 | }; |
| 584 | 584 | } |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | */ |
| 591 | 591 | private function getOrmEntityListenerResolverDefinition(Container $container): \Closure |
| 592 | 592 | { |
| 593 | - return function () use ($container) { |
|
| 593 | + return function() use ($container) { |
|
| 594 | 594 | return new DefaultEntityListenerResolver(); |
| 595 | 595 | }; |
| 596 | 596 | } |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | */ |
| 603 | 603 | private function getOrmRepositoryFactoryDefinition(Container $container): \Closure |
| 604 | 604 | { |
| 605 | - return function () use ($container) { |
|
| 605 | + return function() use ($container) { |
|
| 606 | 606 | return new DefaultRepositoryFactory(); |
| 607 | 607 | }; |
| 608 | 608 | } |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | */ |
| 615 | 615 | private function getOrmSecondLevelCacheConfigurationDefinition(Container $container): \Closure |
| 616 | 616 | { |
| 617 | - return function () use ($container) { |
|
| 617 | + return function() use ($container) { |
|
| 618 | 618 | return new CacheConfiguration(); |
| 619 | 619 | }; |
| 620 | 620 | } |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | */ |
| 627 | 627 | private function getOrmEmDefinition(Container $container): \Closure |
| 628 | 628 | { |
| 629 | - return function () use ($container) { |
|
| 629 | + return function() use ($container) { |
|
| 630 | 630 | $ems = $container['orm.ems']; |
| 631 | 631 | |
| 632 | 632 | return $ems[$container['orm.ems.default']]; |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | */ |
| 641 | 641 | private function getOrmEmConfigDefinition(Container $container): \Closure |
| 642 | 642 | { |
| 643 | - return function () use ($container) { |
|
| 643 | + return function() use ($container) { |
|
| 644 | 644 | $configs = $container['orm.ems.config']; |
| 645 | 645 | |
| 646 | 646 | return $configs[$container['orm.ems.default']]; |