@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | private function getOrmEmsOptionsInitializerDefinition(Container $container): \Closure |
| 105 | 105 | { |
| 106 | - return $container->protect(function () use ($container) { |
|
| 106 | + return $container->protect(function() use ($container) { |
|
| 107 | 107 | static $initialized = false; |
| 108 | 108 | |
| 109 | 109 | if ($initialized) { |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | private function getOrmEmsDefinition(Container $container): \Closure |
| 140 | 140 | { |
| 141 | - return function () use ($container) { |
|
| 141 | + return function() use ($container) { |
|
| 142 | 142 | $container['orm.ems.options.initializer'](); |
| 143 | 143 | |
| 144 | 144 | $ems = new Container(); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $config = $container['orm.ems.config'][$name]; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - $ems[$name] = function () use ($container, $options, $config) { |
|
| 153 | + $ems[$name] = function() use ($container, $options, $config) { |
|
| 154 | 154 | return EntityManager::create( |
| 155 | 155 | $container['dbs'][$options['connection']], |
| 156 | 156 | $config, |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | private function getOrmEmsConfigServiceProvider(Container $container): \Closure |
| 172 | 172 | { |
| 173 | - return function () use ($container) { |
|
| 173 | + return function() use ($container) { |
|
| 174 | 174 | $container['orm.ems.options.initializer'](); |
| 175 | 175 | |
| 176 | 176 | $configs = new Container(); |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | string $name, |
| 195 | 195 | array $options |
| 196 | 196 | ): \Closure { |
| 197 | - return function () use ($container, $name, $options) { |
|
| 197 | + return function() use ($container, $name, $options) { |
|
| 198 | 198 | $config = new Configuration(); |
| 199 | 199 | |
| 200 | 200 | $config->setProxyDir($container['orm.proxies_dir']); |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | */ |
| 247 | 247 | private function getOrmMappingDriverChainDefinition(Container $container): \Closure |
| 248 | 248 | { |
| 249 | - return $container->protect(function (string $name, Configuration $config, array $mappings) use ($container) { |
|
| 249 | + return $container->protect(function(string $name, Configuration $config, array $mappings) use ($container) { |
|
| 250 | 250 | $container['orm.ems.options.initializer'](); |
| 251 | 251 | |
| 252 | 252 | /** @var MappingDriverChain $chain */ |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | */ |
| 284 | 284 | private function getOrmMappingDriverChainFactoryDefinition(Container $container): \Closure |
| 285 | 285 | { |
| 286 | - return $container->protect(function () use ($container) { |
|
| 286 | + return $container->protect(function() use ($container) { |
|
| 287 | 287 | return new MappingDriverChain(); |
| 288 | 288 | }); |
| 289 | 289 | } |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | */ |
| 296 | 296 | private function getOrmMappingDriverFactoryAnnotation(Container $container): \Closure |
| 297 | 297 | { |
| 298 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 298 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 299 | 299 | $useSimpleAnnotationReader = $entity['use_simple_annotation_reader'] ?? true; |
| 300 | 300 | |
| 301 | 301 | return $config->newDefaultAnnotationDriver( |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | */ |
| 313 | 313 | private function getOrmMappingDriverFactoryYaml(Container $container): \Closure |
| 314 | 314 | { |
| 315 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 315 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 316 | 316 | return new YamlDriver($entity['path']); |
| 317 | 317 | }); |
| 318 | 318 | } |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | */ |
| 325 | 325 | private function getOrmMappingDriverFactorySimpleYaml(Container $container): \Closure |
| 326 | 326 | { |
| 327 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 327 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 328 | 328 | return new SimplifiedYamlDriver([$entity['path'] => $entity['namespace']]); |
| 329 | 329 | }); |
| 330 | 330 | } |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | */ |
| 337 | 337 | private function getOrmMappingDriverFactoryXml(Container $container): \Closure |
| 338 | 338 | { |
| 339 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 339 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 340 | 340 | return new XmlDriver($entity['path']); |
| 341 | 341 | }); |
| 342 | 342 | } |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | */ |
| 349 | 349 | private function getOrmMappingDriverFactorySimpleXml(Container $container): \Closure |
| 350 | 350 | { |
| 351 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 351 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 352 | 352 | return new SimplifiedXmlDriver([$entity['path'] => $entity['namespace']]); |
| 353 | 353 | }); |
| 354 | 354 | } |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | */ |
| 361 | 361 | private function getOrmMappingDriverFactoryPhp(Container $container): \Closure |
| 362 | 362 | { |
| 363 | - return $container->protect(function (array $entity, Configuration $config) { |
|
| 363 | + return $container->protect(function(array $entity, Configuration $config) { |
|
| 364 | 364 | return new StaticPHPDriver($entity['path']); |
| 365 | 365 | }); |
| 366 | 366 | } |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | */ |
| 373 | 373 | private function getOrmCacheLocatorDefinition(Container $container): \Closure |
| 374 | 374 | { |
| 375 | - return $container->protect(function (string $name, string $cacheName, array $options) use ($container) { |
|
| 375 | + return $container->protect(function(string $name, string $cacheName, array $options) use ($container) { |
|
| 376 | 376 | $cacheNameKey = $cacheName.'_cache'; |
| 377 | 377 | |
| 378 | 378 | if (!isset($options[$cacheNameKey])) { |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | */ |
| 409 | 409 | private function getOrmCacheFactoryDefinition(Container $container): \Closure |
| 410 | 410 | { |
| 411 | - return $container->protect(function (string $driver, array $cacheOptions) use ($container) { |
|
| 411 | + return $container->protect(function(string $driver, array $cacheOptions) use ($container) { |
|
| 412 | 412 | $cacheFactoryKey = 'orm.cache.factory.'.$driver; |
| 413 | 413 | if (!isset($container[$cacheFactoryKey])) { |
| 414 | 414 | throw new \RuntimeException( |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | */ |
| 428 | 428 | private function getOrmCacheFactoryApcuDefinition(Container $container): \Closure |
| 429 | 429 | { |
| 430 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 430 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 431 | 431 | return new ApcuCache(); |
| 432 | 432 | }); |
| 433 | 433 | } |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | */ |
| 440 | 440 | private function getOrmCacheFactoryArrayDefinition(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 ArrayCache(); |
| 444 | 444 | }); |
| 445 | 445 | } |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | */ |
| 452 | 452 | private function getOrmCacheFactoryFilesystemDefinition(Container $container): \Closure |
| 453 | 453 | { |
| 454 | - return $container->protect(function (array $cacheOptions) { |
|
| 454 | + return $container->protect(function(array $cacheOptions) { |
|
| 455 | 455 | if (empty($cacheOptions['path'])) { |
| 456 | 456 | throw new \RuntimeException('FilesystemCache path not defined'); |
| 457 | 457 | } |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | */ |
| 473 | 473 | private function getOrmCacheFactoryMemcachedDefinition(Container $container): \Closure |
| 474 | 474 | { |
| 475 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 475 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 476 | 476 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
| 477 | 477 | throw new \RuntimeException('Host and port options need to be specified for memcached cache'); |
| 478 | 478 | } |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | */ |
| 495 | 495 | private function getOrmCacheFactoryRedisDefinition(Container $container): \Closure |
| 496 | 496 | { |
| 497 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 497 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 498 | 498 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
| 499 | 499 | throw new \RuntimeException('Host and port options need to be specified for redis cache'); |
| 500 | 500 | } |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | */ |
| 521 | 521 | private function getOrmCacheFactoryXCacheDefinition(Container $container): \Closure |
| 522 | 522 | { |
| 523 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
| 523 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
| 524 | 524 | return new XcacheCache(); |
| 525 | 525 | }); |
| 526 | 526 | } |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | */ |
| 533 | 533 | private function getOrmNamingStrategyDefinition(Container $container): \Closure |
| 534 | 534 | { |
| 535 | - return function () use ($container) { |
|
| 535 | + return function() use ($container) { |
|
| 536 | 536 | return new DefaultNamingStrategy(); |
| 537 | 537 | }; |
| 538 | 538 | } |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | */ |
| 545 | 545 | private function getOrmQuoteStrategyDefinition(Container $container): \Closure |
| 546 | 546 | { |
| 547 | - return function () use ($container) { |
|
| 547 | + return function() use ($container) { |
|
| 548 | 548 | return new DefaultQuoteStrategy(); |
| 549 | 549 | }; |
| 550 | 550 | } |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | */ |
| 557 | 557 | private function getOrmEntityListenerResolverDefinition(Container $container): \Closure |
| 558 | 558 | { |
| 559 | - return function () use ($container) { |
|
| 559 | + return function() use ($container) { |
|
| 560 | 560 | return new DefaultEntityListenerResolver(); |
| 561 | 561 | }; |
| 562 | 562 | } |
@@ -568,7 +568,7 @@ discard block |
||
| 568 | 568 | */ |
| 569 | 569 | private function getOrmRepositoryFactoryDefinition(Container $container): \Closure |
| 570 | 570 | { |
| 571 | - return function () use ($container) { |
|
| 571 | + return function() use ($container) { |
|
| 572 | 572 | return new DefaultRepositoryFactory(); |
| 573 | 573 | }; |
| 574 | 574 | } |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | */ |
| 581 | 581 | private function getOrmSecondLevelCacheConfigurationDefinition(Container $container): \Closure |
| 582 | 582 | { |
| 583 | - return function () use ($container) { |
|
| 583 | + return function() use ($container) { |
|
| 584 | 584 | return new CacheConfiguration(); |
| 585 | 585 | }; |
| 586 | 586 | } |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | */ |
| 593 | 593 | private function getOrmEmDefinition(Container $container): \Closure |
| 594 | 594 | { |
| 595 | - return function () use ($container) { |
|
| 595 | + return function() use ($container) { |
|
| 596 | 596 | $ems = $container['orm.ems']; |
| 597 | 597 | |
| 598 | 598 | return $ems[$container['orm.ems.default']]; |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | */ |
| 607 | 607 | private function getOrmEmConfigDefinition(Container $container): \Closure |
| 608 | 608 | { |
| 609 | - return function () use ($container) { |
|
| 609 | + return function() use ($container) { |
|
| 610 | 610 | $configs = $container['orm.ems.config']; |
| 611 | 611 | |
| 612 | 612 | return $configs[$container['orm.ems.default']]; |