@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * @param Container $container |
60 | 60 | * |
61 | - * @return callable |
|
61 | + * @return \Closure |
|
62 | 62 | */ |
63 | 63 | private function getOrmEmDefinition(Container $container): callable |
64 | 64 | { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | /** |
73 | 73 | * @param Container $container |
74 | 74 | * |
75 | - * @return callable |
|
75 | + * @return \Closure |
|
76 | 76 | */ |
77 | 77 | private function getOrmEmConfigDefinition(Container $container): callable |
78 | 78 | { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | /** |
117 | 117 | * @param Container $container |
118 | 118 | * |
119 | - * @return callable |
|
119 | + * @return \Closure |
|
120 | 120 | */ |
121 | 121 | private function getOrmEmsDefinition(Container $container): callable |
122 | 122 | { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | /** |
148 | 148 | * @param Container $container |
149 | 149 | * |
150 | - * @return callable |
|
150 | + * @return \Closure |
|
151 | 151 | */ |
152 | 152 | private function getOrmEmsConfigServiceProvider(Container $container): callable |
153 | 153 | { |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | /** |
297 | 297 | * @param Container $container |
298 | 298 | * |
299 | - * @return callable |
|
299 | + * @return \Closure |
|
300 | 300 | */ |
301 | 301 | private function getOrmEntityListenerResolverDefinition(Container $container): callable |
302 | 302 | { |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | /** |
309 | 309 | * @param Container $container |
310 | 310 | * |
311 | - * @return callable |
|
311 | + * @return \Closure |
|
312 | 312 | */ |
313 | 313 | private function getOrmManagerRegistryDefintion(Container $container): callable |
314 | 314 | { |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | /** |
422 | 422 | * @param Container $container |
423 | 423 | * |
424 | - * @return callable |
|
424 | + * @return \Closure |
|
425 | 425 | */ |
426 | 426 | private function getOrmRepositoryFactoryDefinition(Container $container): callable |
427 | 427 | { |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | /** |
434 | 434 | * @param Container $container |
435 | 435 | * |
436 | - * @return callable |
|
436 | + * @return \Closure |
|
437 | 437 | */ |
438 | 438 | private function getOrmNamingStrategyDefinition(Container $container): callable |
439 | 439 | { |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | /** |
446 | 446 | * @param Container $container |
447 | 447 | * |
448 | - * @return callable |
|
448 | + * @return \Closure |
|
449 | 449 | */ |
450 | 450 | private function getOrmQuoteStrategyDefinition(Container $container): callable |
451 | 451 | { |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | private function getOrmEmDefinition(Container $container): callable |
75 | 75 | { |
76 | - return function () use ($container) { |
|
76 | + return function() use ($container) { |
|
77 | 77 | $ems = $container['doctrine.orm.ems']; |
78 | 78 | |
79 | 79 | return $ems[$container['doctrine.orm.ems.default']]; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | private function getOrmEmConfigDefinition(Container $container): callable |
89 | 89 | { |
90 | - return function () use ($container) { |
|
90 | + return function() use ($container) { |
|
91 | 91 | $configs = $container['doctrine.orm.ems.config']; |
92 | 92 | |
93 | 93 | return $configs[$container['doctrine.orm.ems.default']]; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | private function getOrmEmFactory(Container $container): callable |
133 | 133 | { |
134 | 134 | return $container->protect( |
135 | - function (Connection $connection, Configuration $config, EventManager $eventManager) { |
|
135 | + function(Connection $connection, Configuration $config, EventManager $eventManager) { |
|
136 | 136 | return EntityManager::create($connection, $config, $eventManager); |
137 | 137 | } |
138 | 138 | ); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | private function getOrmEmsDefinition(Container $container): callable |
147 | 147 | { |
148 | - return function () use ($container) { |
|
148 | + return function() use ($container) { |
|
149 | 149 | $container['doctrine.orm.ems.options.initializer'](); |
150 | 150 | |
151 | 151 | $ems = new Container(); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $config = $container['doctrine.orm.ems.config'][$name]; |
157 | 157 | } |
158 | 158 | |
159 | - $ems[$name] = function () use ($container, $options, $config) { |
|
159 | + $ems[$name] = function() use ($container, $options, $config) { |
|
160 | 160 | return $container['doctrine.orm.em.factory']( |
161 | 161 | $container['doctrine.dbal.dbs'][$options['connection']], |
162 | 162 | $config, |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | private function getOrmEmsConfigServiceProvider(Container $container): callable |
178 | 178 | { |
179 | - return function () use ($container) { |
|
179 | + return function() use ($container) { |
|
180 | 180 | $container['doctrine.orm.ems.options.initializer'](); |
181 | 181 | |
182 | 182 | $configs = new Container(); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | */ |
290 | 290 | private function getOrmEmsOptionsInitializerDefinition(Container $container): callable |
291 | 291 | { |
292 | - return $container->protect(function () use ($container) { |
|
292 | + return $container->protect(function() use ($container) { |
|
293 | 293 | static $initialized = false; |
294 | 294 | |
295 | 295 | if ($initialized) { |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | */ |
325 | 325 | private function getOrmEntityListenerResolverDefinition(Container $container): callable |
326 | 326 | { |
327 | - return function () use ($container) { |
|
327 | + return function() use ($container) { |
|
328 | 328 | return new DefaultEntityListenerResolver(); |
329 | 329 | }; |
330 | 330 | } |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | */ |
337 | 337 | private function getOrmManagerRegistryDefintion(Container $container): callable |
338 | 338 | { |
339 | - return function ($container) { |
|
339 | + return function($container) { |
|
340 | 340 | return new DoctrineOrmManagerRegistry($container); |
341 | 341 | }; |
342 | 342 | } |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | */ |
349 | 349 | private function getOrmMappingDriverFactoryAnnotation(Container $container): callable |
350 | 350 | { |
351 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
351 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
352 | 352 | return $config->newDefaultAnnotationDriver((array) $mapping['path'], false); |
353 | 353 | }); |
354 | 354 | } |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | */ |
361 | 361 | private function getOrmMappingDriverFactoryClassMap(Container $container): callable |
362 | 362 | { |
363 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
363 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
364 | 364 | return new ClassMapDriver($mapping['map']); |
365 | 365 | }); |
366 | 366 | } |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | */ |
373 | 373 | private function getOrmMappingDriverFactoryPhp(Container $container): callable |
374 | 374 | { |
375 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
375 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
376 | 376 | return new PHPDriver($mapping['path']); |
377 | 377 | }); |
378 | 378 | } |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | */ |
385 | 385 | private function getOrmMappingDriverFactorySimpleYaml(Container $container): callable |
386 | 386 | { |
387 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
387 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
388 | 388 | return new SimplifiedYamlDriver( |
389 | 389 | [$mapping['path'] => $mapping['namespace']], |
390 | 390 | $mapping['extension'] ?? SimplifiedYamlDriver::DEFAULT_FILE_EXTENSION |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | */ |
400 | 400 | private function getOrmMappingDriverFactorySimpleXml(Container $container): callable |
401 | 401 | { |
402 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
402 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
403 | 403 | return new SimplifiedXmlDriver( |
404 | 404 | [$mapping['path'] => $mapping['namespace']], |
405 | 405 | $mapping['extension'] ?? SimplifiedXmlDriver::DEFAULT_FILE_EXTENSION |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | */ |
415 | 415 | private function getOrmMappingDriverFactoryStaticPhp(Container $container): callable |
416 | 416 | { |
417 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
417 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
418 | 418 | return new StaticPHPDriver($mapping['path']); |
419 | 419 | }); |
420 | 420 | } |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | */ |
427 | 427 | private function getOrmMappingDriverFactoryYaml(Container $container): callable |
428 | 428 | { |
429 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
429 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
430 | 430 | return new YamlDriver($mapping['path'], $mapping['extension'] ?? YamlDriver::DEFAULT_FILE_EXTENSION); |
431 | 431 | }); |
432 | 432 | } |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | */ |
439 | 439 | private function getOrmMappingDriverFactoryXml(Container $container): callable |
440 | 440 | { |
441 | - return $container->protect(function (array $mapping, Configuration $config) { |
|
441 | + return $container->protect(function(array $mapping, Configuration $config) { |
|
442 | 442 | return new XmlDriver($mapping['path'], $mapping['extension'] ?? XmlDriver::DEFAULT_FILE_EXTENSION); |
443 | 443 | }); |
444 | 444 | } |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | */ |
451 | 451 | private function getOrmMappingDriverChainDefinition(Container $container): callable |
452 | 452 | { |
453 | - return $container->protect(function (Configuration $config, array $mappings) use ($container) { |
|
453 | + return $container->protect(function(Configuration $config, array $mappings) use ($container) { |
|
454 | 454 | $chain = new MappingDriverChain(); |
455 | 455 | foreach ($mappings as $mapping) { |
456 | 456 | if (isset($mapping['alias'])) { |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | */ |
474 | 474 | private function getOrmRepositoryFactoryDefinition(Container $container): callable |
475 | 475 | { |
476 | - return function () use ($container) { |
|
476 | + return function() use ($container) { |
|
477 | 477 | return new DefaultRepositoryFactory(); |
478 | 478 | }; |
479 | 479 | } |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | */ |
486 | 486 | private function getOrmNamingStrategyDefinition(Container $container): callable |
487 | 487 | { |
488 | - return function () use ($container) { |
|
488 | + return function() use ($container) { |
|
489 | 489 | return new DefaultNamingStrategy(); |
490 | 490 | }; |
491 | 491 | } |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | */ |
498 | 498 | private function getOrmQuoteStrategyDefinition(Container $container): callable |
499 | 499 | { |
500 | - return function () use ($container) { |
|
500 | + return function() use ($container) { |
|
501 | 501 | return new DefaultQuoteStrategy(); |
502 | 502 | }; |
503 | 503 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * @param Container $container |
42 | 42 | * |
43 | - * @return callable |
|
43 | + * @return \Closure |
|
44 | 44 | */ |
45 | 45 | private function getDbConnectionRegistryDefintion(Container $container): callable |
46 | 46 | { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * @param Container $container |
54 | 54 | * |
55 | - * @return callable |
|
55 | + * @return \Closure |
|
56 | 56 | */ |
57 | 57 | private function getDbDefinition(Container $container): callable |
58 | 58 | { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | /** |
91 | 91 | * @param Container $container |
92 | 92 | * |
93 | - * @return callable |
|
93 | + * @return \Closure |
|
94 | 94 | */ |
95 | 95 | private function getDbConfigDefinition(Container $container): callable |
96 | 96 | { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | /** |
129 | 129 | * @param Container $container |
130 | 130 | * |
131 | - * @return callable |
|
131 | + * @return \Closure |
|
132 | 132 | */ |
133 | 133 | private function getDbEventManagerDefinition(Container $container): callable |
134 | 134 | { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** |
143 | 143 | * @param Container $container |
144 | 144 | * |
145 | - * @return callable |
|
145 | + * @return \Closure |
|
146 | 146 | */ |
147 | 147 | private function getDbsDefinition(Container $container): callable |
148 | 148 | { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | /** |
172 | 172 | * @param Container $container |
173 | 173 | * |
174 | - * @return callable |
|
174 | + * @return \Closure |
|
175 | 175 | */ |
176 | 176 | private function getDbsConfigDefinition(Container $container): callable |
177 | 177 | { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | /** |
224 | 224 | * @param Container $container |
225 | 225 | * |
226 | - * @return callable |
|
226 | + * @return \Closure |
|
227 | 227 | */ |
228 | 228 | private function getDbsEventManagerDefinition(Container $container): callable |
229 | 229 | { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | private function getDbConnectionRegistryDefintion(Container $container): callable |
46 | 46 | { |
47 | - return function ($container) { |
|
47 | + return function($container) { |
|
48 | 48 | return new DoctrineDbalConnectionRegistry($container); |
49 | 49 | }; |
50 | 50 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | private function getDbDefinition(Container $container): callable |
58 | 58 | { |
59 | - return function () use ($container) { |
|
59 | + return function() use ($container) { |
|
60 | 60 | $dbs = $container['doctrine.dbal.dbs']; |
61 | 61 | |
62 | 62 | return $dbs[$container['doctrine.dbal.dbs.default']]; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | private function getDbApcuCacheFactoryDefinition(Container $container): callable |
72 | 72 | { |
73 | - return $container->protect(function (array $options) use ($container) { |
|
73 | + return $container->protect(function(array $options) use ($container) { |
|
74 | 74 | return new ApcuCache(); |
75 | 75 | }); |
76 | 76 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | private function getDbArrayCacheFactoryDefinition(Container $container): callable |
84 | 84 | { |
85 | - return $container->protect(function (array $options) use ($container) { |
|
85 | + return $container->protect(function(array $options) use ($container) { |
|
86 | 86 | return new ArrayCache(); |
87 | 87 | }); |
88 | 88 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | private function getDbConfigDefinition(Container $container): callable |
96 | 96 | { |
97 | - return function () use ($container) { |
|
97 | + return function() use ($container) { |
|
98 | 98 | $dbs = $container['doctrine.dbal.dbs.config']; |
99 | 99 | |
100 | 100 | return $dbs[$container['doctrine.dbal.dbs.default']]; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | private function getDbEventManagerDefinition(Container $container): callable |
134 | 134 | { |
135 | - return function () use ($container) { |
|
135 | + return function() use ($container) { |
|
136 | 136 | $dbs = $container['doctrine.dbal.dbs.event_manager']; |
137 | 137 | |
138 | 138 | return $dbs[$container['doctrine.dbal.dbs.default']]; |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | private function getDbsDefinition(Container $container): callable |
148 | 148 | { |
149 | - return function () use ($container) { |
|
149 | + return function() use ($container) { |
|
150 | 150 | $container['doctrine.dbal.dbs.options.initializer'](); |
151 | 151 | |
152 | 152 | $dbs = new Container(); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $manager = $container['doctrine.dbal.dbs.event_manager'][$name]; |
160 | 160 | } |
161 | 161 | |
162 | - $dbs[$name] = function () use ($options, $config, $manager) { |
|
162 | + $dbs[$name] = function() use ($options, $config, $manager) { |
|
163 | 163 | return DriverManager::getConnection($options['connection'], $config, $manager); |
164 | 164 | }; |
165 | 165 | } |
@@ -175,14 +175,14 @@ discard block |
||
175 | 175 | */ |
176 | 176 | private function getDbsConfigDefinition(Container $container): callable |
177 | 177 | { |
178 | - return function () use ($container) { |
|
178 | + return function() use ($container) { |
|
179 | 179 | $container['doctrine.dbal.dbs.options.initializer'](); |
180 | 180 | |
181 | 181 | $addLogger = $container['logger'] ?? false; |
182 | 182 | |
183 | 183 | $configs = new Container(); |
184 | 184 | foreach ($container['doctrine.dbal.dbs.options'] as $name => $options) { |
185 | - $configs[$name] = function () use ($addLogger, $container, $name, $options) { |
|
185 | + $configs[$name] = function() use ($addLogger, $container, $name, $options) { |
|
186 | 186 | $configOptions = $options['configuration']; |
187 | 187 | |
188 | 188 | $config = new Configuration(); |
@@ -227,12 +227,12 @@ discard block |
||
227 | 227 | */ |
228 | 228 | private function getDbsEventManagerDefinition(Container $container): callable |
229 | 229 | { |
230 | - return function () use ($container) { |
|
230 | + return function() use ($container) { |
|
231 | 231 | $container['doctrine.dbal.dbs.options.initializer'](); |
232 | 232 | |
233 | 233 | $managers = new Container(); |
234 | 234 | foreach ($container['doctrine.dbal.dbs.options'] as $name => $options) { |
235 | - $managers[$name] = function () { |
|
235 | + $managers[$name] = function() { |
|
236 | 236 | return new EventManager(); |
237 | 237 | }; |
238 | 238 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | */ |
249 | 249 | private function getDbsOptionsInitializerDefinition(Container $container): callable |
250 | 250 | { |
251 | - return $container->protect(function () use ($container) { |
|
251 | + return $container->protect(function() use ($container) { |
|
252 | 252 | static $initialized = false; |
253 | 253 | |
254 | 254 | if ($initialized) { |
@@ -171,7 +171,7 @@ |
||
171 | 171 | $output->writeln( |
172 | 172 | sprintf( |
173 | 173 | '<info>Created database <comment>%s</comment>' |
174 | - .' for connection named <comment>%s</comment>.</info>', |
|
174 | + .' for connection named <comment>%s</comment>.</info>', |
|
175 | 175 | $dbName, |
176 | 176 | $connectionName |
177 | 177 | ) |
@@ -181,7 +181,7 @@ |
||
181 | 181 | * @param string $connectionName |
182 | 182 | * @param Connection $connection |
183 | 183 | * @param string $dbName |
184 | - * @param bool $shouldNotCreateDatabase |
|
184 | + * @param bool $shouldDropDatabase |
|
185 | 185 | * |
186 | 186 | * @return int |
187 | 187 | */ |