@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | private function getOrmEmsOptionsInitializerDefinition(Container $container): \Closure |
98 | 98 | { |
99 | - return $container->protect(function () use ($container) { |
|
99 | + return $container->protect(function() use ($container) { |
|
100 | 100 | static $initialized = false; |
101 | 101 | |
102 | 102 | if ($initialized) { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | private function getOrmEmsDefinition(Container $container): \Closure |
133 | 133 | { |
134 | - return function () use ($container) { |
|
134 | + return function() use ($container) { |
|
135 | 135 | $container['orm.ems.options.initializer'](); |
136 | 136 | |
137 | 137 | $ems = new Container(); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $config = $container['orm.ems.config'][$name]; |
144 | 144 | } |
145 | 145 | |
146 | - $ems[$name] = function () use ($container, $options, $config) { |
|
146 | + $ems[$name] = function() use ($container, $options, $config) { |
|
147 | 147 | return EntityManager::create( |
148 | 148 | $container['dbs'][$options['connection']], |
149 | 149 | $config, |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | private function getOrmEmsConfigServiceProvider(Container $container): \Closure |
165 | 165 | { |
166 | - return function () use ($container) { |
|
166 | + return function() use ($container) { |
|
167 | 167 | $container['orm.ems.options.initializer'](); |
168 | 168 | |
169 | 169 | $configs = new Container(); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | string $name, |
188 | 188 | array $options |
189 | 189 | ): \Closure { |
190 | - return function () use ($container, $name, $options) { |
|
190 | + return function() use ($container, $name, $options) { |
|
191 | 191 | $config = new Configuration(); |
192 | 192 | |
193 | 193 | $container['orm.cache.configurer']($name, $config, $options); |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | private function getOrmCacheConfigurerDefinition(Container $container): \Closure |
289 | 289 | { |
290 | - return $container->protect(function ($name, Configuration $config, $options) use ($container) { |
|
290 | + return $container->protect(function($name, Configuration $config, $options) use ($container) { |
|
291 | 291 | $config->setMetadataCacheImpl($container['orm.cache.locator']($name, 'metadata', $options)); |
292 | 292 | $config->setQueryCacheImpl($container['orm.cache.locator']($name, 'query', $options)); |
293 | 293 | $config->setResultCacheImpl($container['orm.cache.locator']($name, 'result', $options)); |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | */ |
303 | 303 | private function getOrmCacheLocatorDefinition(Container $container): \Closure |
304 | 304 | { |
305 | - return $container->protect(function ($name, $cacheName, $options) use ($container) { |
|
305 | + return $container->protect(function($name, $cacheName, $options) use ($container) { |
|
306 | 306 | $cacheNameKey = $cacheName.'_cache'; |
307 | 307 | |
308 | 308 | if (!isset($options[$cacheNameKey])) { |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | */ |
344 | 344 | private function getOrmCacheFactoryApcuDefinition(Container $container): \Closure |
345 | 345 | { |
346 | - return $container->protect(function () use ($container) { |
|
346 | + return $container->protect(function() use ($container) { |
|
347 | 347 | return new ApcuCache(); |
348 | 348 | }); |
349 | 349 | } |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | */ |
356 | 356 | private function getOrmCacheFactoryArrayDefinition(Container $container): \Closure |
357 | 357 | { |
358 | - return $container->protect(function () use ($container) { |
|
358 | + return $container->protect(function() use ($container) { |
|
359 | 359 | return new ArrayCache(); |
360 | 360 | }); |
361 | 361 | } |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | */ |
368 | 368 | private function getOrmCacheFactoryFilesystemDefinition(Container $container): \Closure |
369 | 369 | { |
370 | - return $container->protect(function ($cacheOptions) { |
|
370 | + return $container->protect(function($cacheOptions) { |
|
371 | 371 | if (empty($cacheOptions['path'])) { |
372 | 372 | throw new \RuntimeException('FilesystemCache path not defined'); |
373 | 373 | } |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | */ |
389 | 389 | private function getOrmCacheFactoryMemcacheDefinition(Container $container): \Closure |
390 | 390 | { |
391 | - return $container->protect(function ($cacheOptions) use ($container) { |
|
391 | + return $container->protect(function($cacheOptions) use ($container) { |
|
392 | 392 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
393 | 393 | throw new \RuntimeException('Host and port options need to be specified for memcache cache'); |
394 | 394 | } |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | */ |
411 | 411 | private function getOrmCacheFactoryMemcachedDefinition(Container $container): \Closure |
412 | 412 | { |
413 | - return $container->protect(function ($cacheOptions) use ($container) { |
|
413 | + return $container->protect(function($cacheOptions) use ($container) { |
|
414 | 414 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
415 | 415 | throw new \RuntimeException('Host and port options need to be specified for memcached cache'); |
416 | 416 | } |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | */ |
433 | 433 | private function getOrmCacheFactoryRedisDefinition(Container $container): \Closure |
434 | 434 | { |
435 | - return $container->protect(function ($cacheOptions) use ($container) { |
|
435 | + return $container->protect(function($cacheOptions) use ($container) { |
|
436 | 436 | if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { |
437 | 437 | throw new \RuntimeException('Host and port options need to be specified for redis cache'); |
438 | 438 | } |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | */ |
459 | 459 | private function getOrmCacheFactoryXCacheDefinition(Container $container): \Closure |
460 | 460 | { |
461 | - return $container->protect(function () use ($container) { |
|
461 | + return $container->protect(function() use ($container) { |
|
462 | 462 | return new XcacheCache(); |
463 | 463 | }); |
464 | 464 | } |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | */ |
471 | 471 | private function getOrmCacheFactoryDefinition(Container $container): \Closure |
472 | 472 | { |
473 | - return $container->protect(function ($driver, $cacheOptions) use ($container) { |
|
473 | + return $container->protect(function($driver, $cacheOptions) use ($container) { |
|
474 | 474 | $cacheFactoryKey = 'orm.cache.factory.'.$driver; |
475 | 475 | if (!isset($container[$cacheFactoryKey])) { |
476 | 476 | throw new \RuntimeException( |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | */ |
490 | 490 | private function getOrmMappingDriverChainLocatorDefinition(Container $container): \Closure |
491 | 491 | { |
492 | - return $container->protect(function ($name = null) use ($container) { |
|
492 | + return $container->protect(function($name = null) use ($container) { |
|
493 | 493 | $container['orm.ems.options.initializer'](); |
494 | 494 | |
495 | 495 | if (null === $name) { |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | */ |
513 | 513 | private function getOrmMappingDriverChainFactoryDefinition(Container $container): \Closure |
514 | 514 | { |
515 | - return $container->protect(function () use ($container) { |
|
515 | + return $container->protect(function() use ($container) { |
|
516 | 516 | return new MappingDriverChain(); |
517 | 517 | }); |
518 | 518 | } |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | */ |
525 | 525 | private function getOrmNamingStrategyDefinition(Container $container): \Closure |
526 | 526 | { |
527 | - return function () use ($container) { |
|
527 | + return function() use ($container) { |
|
528 | 528 | return new DefaultNamingStrategy(); |
529 | 529 | }; |
530 | 530 | } |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | */ |
537 | 537 | private function getOrmQuoteStrategyDefinition(Container $container): \Closure |
538 | 538 | { |
539 | - return function () use ($container) { |
|
539 | + return function() use ($container) { |
|
540 | 540 | return new DefaultQuoteStrategy(); |
541 | 541 | }; |
542 | 542 | } |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | */ |
549 | 549 | private function getOrmEntityListenerResolverDefinition(Container $container): \Closure |
550 | 550 | { |
551 | - return function () use ($container) { |
|
551 | + return function() use ($container) { |
|
552 | 552 | return new DefaultEntityListenerResolver(); |
553 | 553 | }; |
554 | 554 | } |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | */ |
561 | 561 | private function getOrmRepositoryFactoryDefinition(Container $container): \Closure |
562 | 562 | { |
563 | - return function () use ($container) { |
|
563 | + return function() use ($container) { |
|
564 | 564 | return new DefaultRepositoryFactory(); |
565 | 565 | }; |
566 | 566 | } |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | */ |
573 | 573 | private function getOrmEmDefinition(Container $container): \Closure |
574 | 574 | { |
575 | - return function () use ($container) { |
|
575 | + return function() use ($container) { |
|
576 | 576 | $ems = $container['orm.ems']; |
577 | 577 | |
578 | 578 | return $ems[$container['orm.ems.default']]; |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | */ |
587 | 587 | private function getOrmEmConfigDefinition(Container $container): \Closure |
588 | 588 | { |
589 | - return function () use ($container) { |
|
589 | + return function() use ($container) { |
|
590 | 590 | $configs = $container['orm.ems.config']; |
591 | 591 | |
592 | 592 | return $configs[$container['orm.ems.default']]; |