@@ -5,8 +5,6 @@ |
||
5 | 5 | namespace Chubbyphp\ServiceProvider; |
6 | 6 | |
7 | 7 | use Chubbyphp\ServiceProvider\Registry\DoctrineOrmManagerRegistry; |
8 | -use Doctrine\Common\Cache\ApcuCache; |
|
9 | -use Doctrine\Common\Cache\ArrayCache; |
|
10 | 8 | use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain; |
11 | 9 | use Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver; |
12 | 10 | use Doctrine\ORM\Cache\CacheConfiguration; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | private function getOrmEmDefinition(Container $container): callable |
65 | 65 | { |
66 | - return function () use ($container) { |
|
66 | + return function() use ($container) { |
|
67 | 67 | $ems = $container['doctrine.orm.ems']; |
68 | 68 | |
69 | 69 | return $ems[$container['doctrine.orm.ems.default']]; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | private function getOrmEmConfigDefinition(Container $container): callable |
79 | 79 | { |
80 | - return function () use ($container) { |
|
80 | + return function() use ($container) { |
|
81 | 81 | $configs = $container['doctrine.orm.ems.config']; |
82 | 82 | |
83 | 83 | return $configs[$container['doctrine.orm.ems.default']]; |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | private function getOrmEmsDefinition(Container $container): callable |
123 | 123 | { |
124 | - return function () use ($container) { |
|
124 | + return function() use ($container) { |
|
125 | 125 | $container['doctrine.orm.ems.options.initializer'](); |
126 | 126 | |
127 | 127 | $ems = new Container(); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $config = $container['doctrine.orm.ems.config'][$name]; |
133 | 133 | } |
134 | 134 | |
135 | - $ems[$name] = function () use ($container, $options, $config) { |
|
135 | + $ems[$name] = function() use ($container, $options, $config) { |
|
136 | 136 | return EntityManager::create( |
137 | 137 | $container['doctrine.dbal.dbs'][$options['connection']], |
138 | 138 | $config, |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | private function getOrmEmsConfigServiceProvider(Container $container): callable |
154 | 154 | { |
155 | - return function () use ($container) { |
|
155 | + return function() use ($container) { |
|
156 | 156 | $container['doctrine.orm.ems.options.initializer'](); |
157 | 157 | |
158 | 158 | $configs = new Container(); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | */ |
255 | 255 | private function getOrmEmsOptionsInitializerDefinition(Container $container): callable |
256 | 256 | { |
257 | - return $container->protect(function () use ($container) { |
|
257 | + return $container->protect(function() use ($container) { |
|
258 | 258 | static $initialized = false; |
259 | 259 | |
260 | 260 | if ($initialized) { |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | */ |
291 | 291 | private function getOrmEntityListenerResolverDefinition(Container $container): callable |
292 | 292 | { |
293 | - return function () use ($container) { |
|
293 | + return function() use ($container) { |
|
294 | 294 | return new DefaultEntityListenerResolver(); |
295 | 295 | }; |
296 | 296 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | */ |
303 | 303 | private function getOrmManagerRegistryDefintion(Container $container): callable |
304 | 304 | { |
305 | - return function ($container) { |
|
305 | + return function($container) { |
|
306 | 306 | return new DoctrineOrmManagerRegistry($container); |
307 | 307 | }; |
308 | 308 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | */ |
315 | 315 | private function getOrmMappingDriverFactoryAnnotation(Container $container): callable |
316 | 316 | { |
317 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
317 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
318 | 318 | return $config->newDefaultAnnotationDriver((array) $mapping['path'], false); |
319 | 319 | }); |
320 | 320 | } |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | */ |
327 | 327 | private function getOrmMappingDriverFactoryStaticPhp(Container $container): callable |
328 | 328 | { |
329 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
329 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
330 | 330 | return new StaticPHPDriver($mapping['path']); |
331 | 331 | }); |
332 | 332 | } |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | */ |
339 | 339 | private function getOrmMappingDriverFactorySimpleYaml(Container $container): callable |
340 | 340 | { |
341 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
341 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
342 | 342 | return new SimplifiedYamlDriver( |
343 | 343 | [$mapping['path'] => $mapping['namespace']], |
344 | 344 | $mapping['extension'] ?? SimplifiedYamlDriver::DEFAULT_FILE_EXTENSION |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | */ |
354 | 354 | private function getOrmMappingDriverFactorySimpleXml(Container $container): callable |
355 | 355 | { |
356 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
356 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
357 | 357 | return new SimplifiedXmlDriver( |
358 | 358 | [$mapping['path'] => $mapping['namespace']], |
359 | 359 | $mapping['extension'] ?? SimplifiedXmlDriver::DEFAULT_FILE_EXTENSION |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | */ |
369 | 369 | private function getOrmMappingDriverFactoryYaml(Container $container): callable |
370 | 370 | { |
371 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
371 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
372 | 372 | return new YamlDriver($mapping['path'], $mapping['extension'] ?? YamlDriver::DEFAULT_FILE_EXTENSION); |
373 | 373 | }); |
374 | 374 | } |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | */ |
381 | 381 | private function getOrmMappingDriverFactoryXml(Container $container): callable |
382 | 382 | { |
383 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
383 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
384 | 384 | return new XmlDriver($mapping['path'], $mapping['extension'] ?? XmlDriver::DEFAULT_FILE_EXTENSION); |
385 | 385 | }); |
386 | 386 | } |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | */ |
393 | 393 | private function getOrmMappingDriverChainDefinition(Container $container): callable |
394 | 394 | { |
395 | - return $container->protect(function (Configuration $config, array $mappings) use ($container) { |
|
395 | + return $container->protect(function(Configuration $config, array $mappings) use ($container) { |
|
396 | 396 | $chain = new MappingDriverChain(); |
397 | 397 | foreach ($mappings as $mapping) { |
398 | 398 | if (isset($mapping['alias'])) { |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | */ |
416 | 416 | private function getOrmRepositoryFactoryDefinition(Container $container): callable |
417 | 417 | { |
418 | - return function () use ($container) { |
|
418 | + return function() use ($container) { |
|
419 | 419 | return new DefaultRepositoryFactory(); |
420 | 420 | }; |
421 | 421 | } |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | */ |
428 | 428 | private function getOrmNamingStrategyDefinition(Container $container): callable |
429 | 429 | { |
430 | - return function () use ($container) { |
|
430 | + return function() use ($container) { |
|
431 | 431 | return new DefaultNamingStrategy(); |
432 | 432 | }; |
433 | 433 | } |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | */ |
440 | 440 | private function getOrmQuoteStrategyDefinition(Container $container): callable |
441 | 441 | { |
442 | - return function () use ($container) { |
|
442 | + return function() use ($container) { |
|
443 | 443 | return new DefaultQuoteStrategy(); |
444 | 444 | }; |
445 | 445 | } |