@@ -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 | $cacheInstanceKey = 'orm.mapping_driver_chain.instances.'.$name; |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | */ |
289 | 289 | private function getOrmMappingDriverChainFactoryDefinition(Container $container): \Closure |
290 | 290 | { |
291 | - return $container->protect(function () use ($container) { |
|
291 | + return $container->protect(function() use ($container) { |
|
292 | 292 | return new MappingDriverChain(); |
293 | 293 | }); |
294 | 294 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | */ |
301 | 301 | private function getOrmMappingDriverFactoryAnnotation(Container $container): \Closure |
302 | 302 | { |
303 | - return $container->protect(function (array $entity, Configuration $config) { |
|
303 | + return $container->protect(function(array $entity, Configuration $config) { |
|
304 | 304 | $useSimpleAnnotationReader = $entity['use_simple_annotation_reader'] ?? true; |
305 | 305 | |
306 | 306 | return $config->newDefaultAnnotationDriver( |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | */ |
318 | 318 | private function getOrmMappingDriverFactoryYaml(Container $container): \Closure |
319 | 319 | { |
320 | - return $container->protect(function (array $entity, Configuration $config) { |
|
320 | + return $container->protect(function(array $entity, Configuration $config) { |
|
321 | 321 | return new YamlDriver($entity['path']); |
322 | 322 | }); |
323 | 323 | } |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | */ |
330 | 330 | private function getOrmMappingDriverFactorySimpleYaml(Container $container): \Closure |
331 | 331 | { |
332 | - return $container->protect(function (array $entity, Configuration $config) { |
|
332 | + return $container->protect(function(array $entity, Configuration $config) { |
|
333 | 333 | return new SimplifiedYamlDriver([$entity['path'] => $entity['namespace']]); |
334 | 334 | }); |
335 | 335 | } |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | */ |
342 | 342 | private function getOrmMappingDriverFactoryXml(Container $container): \Closure |
343 | 343 | { |
344 | - return $container->protect(function (array $entity, Configuration $config) { |
|
344 | + return $container->protect(function(array $entity, Configuration $config) { |
|
345 | 345 | return new XmlDriver($entity['path']); |
346 | 346 | }); |
347 | 347 | } |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | */ |
354 | 354 | private function getOrmMappingDriverFactorySimpleXml(Container $container): \Closure |
355 | 355 | { |
356 | - return $container->protect(function (array $entity, Configuration $config) { |
|
356 | + return $container->protect(function(array $entity, Configuration $config) { |
|
357 | 357 | return new SimplifiedXmlDriver([$entity['path'] => $entity['namespace']]); |
358 | 358 | }); |
359 | 359 | } |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | */ |
366 | 366 | private function getOrmMappingDriverFactoryPhp(Container $container): \Closure |
367 | 367 | { |
368 | - return $container->protect(function (array $entity, Configuration $config) { |
|
368 | + return $container->protect(function(array $entity, Configuration $config) { |
|
369 | 369 | return new StaticPHPDriver($entity['path']); |
370 | 370 | }); |
371 | 371 | } |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | */ |
378 | 378 | private function getOrmCacheLocatorDefinition(Container $container): \Closure |
379 | 379 | { |
380 | - return $container->protect(function (string $name, string $cacheName, array $options) use ($container) { |
|
380 | + return $container->protect(function(string $name, string $cacheName, array $options) use ($container) { |
|
381 | 381 | $cacheNameKey = $cacheName.'_cache'; |
382 | 382 | |
383 | 383 | if (!isset($options[$cacheNameKey])) { |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | */ |
419 | 419 | private function getOrmCacheFactoryDefinition(Container $container): \Closure |
420 | 420 | { |
421 | - return $container->protect(function (string $driver, array $cacheOptions) use ($container) { |
|
421 | + return $container->protect(function(string $driver, array $cacheOptions) use ($container) { |
|
422 | 422 | $cacheFactoryKey = 'orm.cache.factory.'.$driver; |
423 | 423 | if (!isset($container[$cacheFactoryKey])) { |
424 | 424 | throw new \RuntimeException( |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | */ |
438 | 438 | private function getOrmCacheFactoryApcuDefinition(Container $container): \Closure |
439 | 439 | { |
440 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
440 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
441 | 441 | return new ApcuCache(); |
442 | 442 | }); |
443 | 443 | } |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | */ |
450 | 450 | private function getOrmCacheFactoryArrayDefinition(Container $container): \Closure |
451 | 451 | { |
452 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
452 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
453 | 453 | return new ArrayCache(); |
454 | 454 | }); |
455 | 455 | } |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | */ |
462 | 462 | private function getOrmCacheFactoryFilesystemDefinition(Container $container): \Closure |
463 | 463 | { |
464 | - return $container->protect(function (array $cacheOptions) { |
|
464 | + return $container->protect(function(array $cacheOptions) { |
|
465 | 465 | if (empty($cacheOptions['path'])) { |
466 | 466 | throw new \RuntimeException('FilesystemCache path not defined'); |
467 | 467 | } |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | */ |
483 | 483 | private function getOrmCacheFactoryMemcachedDefinition(Container $container): \Closure |
484 | 484 | { |
485 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
485 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
486 | 486 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
487 | 487 | throw new \RuntimeException('Host and port options need to be specified for memcached cache'); |
488 | 488 | } |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | */ |
505 | 505 | private function getOrmCacheFactoryRedisDefinition(Container $container): \Closure |
506 | 506 | { |
507 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
507 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
508 | 508 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
509 | 509 | throw new \RuntimeException('Host and port options need to be specified for redis cache'); |
510 | 510 | } |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | */ |
531 | 531 | private function getOrmCacheFactoryXCacheDefinition(Container $container): \Closure |
532 | 532 | { |
533 | - return $container->protect(function (array $cacheOptions) use ($container) { |
|
533 | + return $container->protect(function(array $cacheOptions) use ($container) { |
|
534 | 534 | return new XcacheCache(); |
535 | 535 | }); |
536 | 536 | } |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | */ |
543 | 543 | private function getOrmNamingStrategyDefinition(Container $container): \Closure |
544 | 544 | { |
545 | - return function () use ($container) { |
|
545 | + return function() use ($container) { |
|
546 | 546 | return new DefaultNamingStrategy(); |
547 | 547 | }; |
548 | 548 | } |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | */ |
555 | 555 | private function getOrmQuoteStrategyDefinition(Container $container): \Closure |
556 | 556 | { |
557 | - return function () use ($container) { |
|
557 | + return function() use ($container) { |
|
558 | 558 | return new DefaultQuoteStrategy(); |
559 | 559 | }; |
560 | 560 | } |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | */ |
567 | 567 | private function getOrmEntityListenerResolverDefinition(Container $container): \Closure |
568 | 568 | { |
569 | - return function () use ($container) { |
|
569 | + return function() use ($container) { |
|
570 | 570 | return new DefaultEntityListenerResolver(); |
571 | 571 | }; |
572 | 572 | } |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | */ |
579 | 579 | private function getOrmRepositoryFactoryDefinition(Container $container): \Closure |
580 | 580 | { |
581 | - return function () use ($container) { |
|
581 | + return function() use ($container) { |
|
582 | 582 | return new DefaultRepositoryFactory(); |
583 | 583 | }; |
584 | 584 | } |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | */ |
591 | 591 | private function getOrmSecondLevelCacheConfigurationDefinition(Container $container): \Closure |
592 | 592 | { |
593 | - return function () use ($container) { |
|
593 | + return function() use ($container) { |
|
594 | 594 | return new CacheConfiguration(); |
595 | 595 | }; |
596 | 596 | } |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | */ |
603 | 603 | private function getOrmEmDefinition(Container $container): \Closure |
604 | 604 | { |
605 | - return function () use ($container) { |
|
605 | + return function() use ($container) { |
|
606 | 606 | $ems = $container['orm.ems']; |
607 | 607 | |
608 | 608 | return $ems[$container['orm.ems.default']]; |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | */ |
617 | 617 | private function getOrmEmConfigDefinition(Container $container): \Closure |
618 | 618 | { |
619 | - return function () use ($container) { |
|
619 | + return function() use ($container) { |
|
620 | 620 | $configs = $container['orm.ems.config']; |
621 | 621 | |
622 | 622 | return $configs[$container['orm.ems.default']]; |