@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | |
42 | 42 | private function getDbConnectionRegistryDefintion(Container $container): callable |
43 | 43 | { |
44 | - return static function () use ($container) { |
|
44 | + return static function() use ($container) { |
|
45 | 45 | return new DoctrineDbalConnectionRegistry($container); |
46 | 46 | }; |
47 | 47 | } |
48 | 48 | |
49 | 49 | private function getDbDefinition(Container $container): callable |
50 | 50 | { |
51 | - return static function () use ($container) { |
|
51 | + return static function() use ($container) { |
|
52 | 52 | $dbs = $container['doctrine.dbal.dbs']; |
53 | 53 | |
54 | 54 | return $dbs[$container['doctrine.dbal.dbs.default']]; |
@@ -57,21 +57,21 @@ discard block |
||
57 | 57 | |
58 | 58 | private function getDbApcuCacheFactoryDefinition(Container $container): callable |
59 | 59 | { |
60 | - return $container->protect(static function () { |
|
60 | + return $container->protect(static function() { |
|
61 | 61 | return new ApcuCache(); |
62 | 62 | }); |
63 | 63 | } |
64 | 64 | |
65 | 65 | private function getDbArrayCacheFactoryDefinition(Container $container): callable |
66 | 66 | { |
67 | - return $container->protect(static function () { |
|
67 | + return $container->protect(static function() { |
|
68 | 68 | return new ArrayCache(); |
69 | 69 | }); |
70 | 70 | } |
71 | 71 | |
72 | 72 | private function getDbConfigDefinition(Container $container): callable |
73 | 73 | { |
74 | - return static function () use ($container) { |
|
74 | + return static function() use ($container) { |
|
75 | 75 | $dbs = $container['doctrine.dbal.dbs.config']; |
76 | 76 | |
77 | 77 | return $dbs[$container['doctrine.dbal.dbs.default']]; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | private function getDbEventManagerDefinition(Container $container): callable |
107 | 107 | { |
108 | - return static function () use ($container) { |
|
108 | + return static function() use ($container) { |
|
109 | 109 | $dbs = $container['doctrine.dbal.dbs.event_manager']; |
110 | 110 | |
111 | 111 | return $dbs[$container['doctrine.dbal.dbs.default']]; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | private function getDbsDefinition(Container $container): callable |
116 | 116 | { |
117 | - return static function () use ($container) { |
|
117 | + return static function() use ($container) { |
|
118 | 118 | $container['doctrine.dbal.dbs.options.initializer'](); |
119 | 119 | |
120 | 120 | $dbs = new Container(); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $manager = $container['doctrine.dbal.dbs.event_manager'][$name]; |
128 | 128 | } |
129 | 129 | |
130 | - $dbs[$name] = static function () use ($options, $config, $manager) { |
|
130 | + $dbs[$name] = static function() use ($options, $config, $manager) { |
|
131 | 131 | return DriverManager::getConnection($options['connection'], $config, $manager); |
132 | 132 | }; |
133 | 133 | } |
@@ -138,14 +138,14 @@ discard block |
||
138 | 138 | |
139 | 139 | private function getDbsConfigDefinition(Container $container): callable |
140 | 140 | { |
141 | - return function () use ($container) { |
|
141 | + return function() use ($container) { |
|
142 | 142 | $container['doctrine.dbal.dbs.options.initializer'](); |
143 | 143 | |
144 | 144 | $addLogger = $container['logger'] ?? false; |
145 | 145 | |
146 | 146 | $configs = new Container(); |
147 | 147 | foreach ($container['doctrine.dbal.dbs.options'] as $name => $options) { |
148 | - $configs[$name] = function () use ($addLogger, $container, $options) { |
|
148 | + $configs[$name] = function() use ($addLogger, $container, $options) { |
|
149 | 149 | $configOptions = $options['configuration']; |
150 | 150 | |
151 | 151 | $config = new Configuration(); |
@@ -187,12 +187,12 @@ discard block |
||
187 | 187 | |
188 | 188 | private function getDbsEventManagerDefinition(Container $container): callable |
189 | 189 | { |
190 | - return static function () use ($container) { |
|
190 | + return static function() use ($container) { |
|
191 | 191 | $container['doctrine.dbal.dbs.options.initializer'](); |
192 | 192 | |
193 | 193 | $managers = new Container(); |
194 | 194 | foreach (array_keys($container['doctrine.dbal.dbs.options']) as $name) { |
195 | - $managers[$name] = static function () { |
|
195 | + $managers[$name] = static function() { |
|
196 | 196 | return new EventManager(); |
197 | 197 | }; |
198 | 198 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | private function getDbsNameDefinition(Container $container): callable |
205 | 205 | { |
206 | - return static function () use ($container) { |
|
206 | + return static function() use ($container) { |
|
207 | 207 | $container['doctrine.dbal.dbs.options.initializer'](); |
208 | 208 | |
209 | 209 | return array_keys($container['doctrine.dbal.dbs.options']); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | private function getDbsOptionsInitializerDefinition(Container $container): callable |
214 | 214 | { |
215 | - return $container->protect(static function () use ($container): void { |
|
215 | + return $container->protect(static function() use ($container): void { |
|
216 | 216 | static $initialized = false; |
217 | 217 | |
218 | 218 | if ($initialized) { |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | |
40 | 40 | private function getDbConnectionRegistryDefintion(): \Closure |
41 | 41 | { |
42 | - return static function (ContainerInterface $container) { |
|
42 | + return static function(ContainerInterface $container) { |
|
43 | 43 | return new DoctrineDbalConnectionRegistry($container); |
44 | 44 | }; |
45 | 45 | } |
46 | 46 | |
47 | 47 | private function getDbDefinition(): \Closure |
48 | 48 | { |
49 | - return static function (ContainerInterface $container) { |
|
49 | + return static function(ContainerInterface $container) { |
|
50 | 50 | /** @var Container $dbs */ |
51 | 51 | $dbs = $container->get('doctrine.dbal.dbs'); |
52 | 52 | |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | |
57 | 57 | private function getDbApcuCacheFactoryDefinition(): \Closure |
58 | 58 | { |
59 | - return static function () { |
|
60 | - return static function () { |
|
59 | + return static function() { |
|
60 | + return static function() { |
|
61 | 61 | return new ApcuCache(); |
62 | 62 | }; |
63 | 63 | }; |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | |
66 | 66 | private function getDbArrayCacheFactoryDefinition(): \Closure |
67 | 67 | { |
68 | - return static function () { |
|
69 | - return static function () { |
|
68 | + return static function() { |
|
69 | + return static function() { |
|
70 | 70 | return new ArrayCache(); |
71 | 71 | }; |
72 | 72 | }; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | private function getDbConfigDefinition(): \Closure |
76 | 76 | { |
77 | - return static function (ContainerInterface $container) { |
|
77 | + return static function(ContainerInterface $container) { |
|
78 | 78 | /** @var Container $dbsConfigs */ |
79 | 79 | $dbsConfigs = $container->get('doctrine.dbal.dbs.config'); |
80 | 80 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | private function getDbDefaultOptions(): \Closure |
86 | 86 | { |
87 | - return static function () { |
|
87 | + return static function() { |
|
88 | 88 | return [ |
89 | 89 | 'configuration' => [ |
90 | 90 | 'auto_commit' => true, |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | private function getDbEventManagerDefinition(): \Closure |
110 | 110 | { |
111 | - return static function (ContainerInterface $container) { |
|
111 | + return static function(ContainerInterface $container) { |
|
112 | 112 | /** @var Container $dbEvents */ |
113 | 113 | $dbEvents = $container->get('doctrine.dbal.dbs.event_manager'); |
114 | 114 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | private function getDbsDefinition(): \Closure |
120 | 120 | { |
121 | - return static function (ContainerInterface $container) { |
|
121 | + return static function(ContainerInterface $container) { |
|
122 | 122 | $container->get('doctrine.dbal.dbs.options.initializer')(); |
123 | 123 | |
124 | 124 | $dbs = new Container(); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $manager = $container->get('doctrine.dbal.dbs.event_manager')->get($name); |
132 | 132 | } |
133 | 133 | |
134 | - $dbs->factory($name, static function () use ($options, $config, $manager) { |
|
134 | + $dbs->factory($name, static function() use ($options, $config, $manager) { |
|
135 | 135 | return DriverManager::getConnection($options['connection'], $config, $manager); |
136 | 136 | }); |
137 | 137 | } |
@@ -142,14 +142,14 @@ discard block |
||
142 | 142 | |
143 | 143 | private function getDbsConfigDefinition(): \Closure |
144 | 144 | { |
145 | - return function (ContainerInterface $container) { |
|
145 | + return function(ContainerInterface $container) { |
|
146 | 146 | $container->get('doctrine.dbal.dbs.options.initializer')(); |
147 | 147 | |
148 | 148 | $logger = $container->has('logger') ? $container->get('logger') : null; |
149 | 149 | |
150 | 150 | $configs = new Container(); |
151 | 151 | foreach ($container->get('doctrine.dbal.dbs.options') as $name => $options) { |
152 | - $configs->factory($name, function () use ($logger, $container, $options) { |
|
152 | + $configs->factory($name, function() use ($logger, $container, $options) { |
|
153 | 153 | $configOptions = $options['configuration']; |
154 | 154 | |
155 | 155 | $config = new Configuration(); |
@@ -191,12 +191,12 @@ discard block |
||
191 | 191 | |
192 | 192 | private function getDbsEventManagerDefinition(): \Closure |
193 | 193 | { |
194 | - return static function (ContainerInterface $container) { |
|
194 | + return static function(ContainerInterface $container) { |
|
195 | 195 | $container->get('doctrine.dbal.dbs.options.initializer')(); |
196 | 196 | |
197 | 197 | $managers = new Container(); |
198 | 198 | foreach ($container->get('doctrine.dbal.dbs.name') as $name) { |
199 | - $managers->factory((string) $name, static function () { |
|
199 | + $managers->factory((string) $name, static function() { |
|
200 | 200 | return new EventManager(); |
201 | 201 | }); |
202 | 202 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | private function getDbsNameDefinition(): \Closure |
209 | 209 | { |
210 | - return static function (ContainerInterface $container) { |
|
210 | + return static function(ContainerInterface $container) { |
|
211 | 211 | $container->get('doctrine.dbal.dbs.options.initializer')(); |
212 | 212 | |
213 | 213 | return array_keys($container->get('doctrine.dbal.dbs.options')); |
@@ -216,8 +216,8 @@ discard block |
||
216 | 216 | |
217 | 217 | private function getDbsOptionsInitializerDefinition(): \Closure |
218 | 218 | { |
219 | - return static function (ContainerInterface $container) { |
|
220 | - return static function () use ($container): void { |
|
219 | + return static function(ContainerInterface $container) { |
|
220 | + return static function() use ($container): void { |
|
221 | 221 | static $initialized = false; |
222 | 222 | |
223 | 223 | if ($initialized) { |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | if (!$container->has('doctrine.dbal.dbs.options')) { |
238 | 238 | $container->factory( |
239 | 239 | 'doctrine.dbal.dbs.options', |
240 | - static function (ContainerInterface $container) { |
|
240 | + static function(ContainerInterface $container) { |
|
241 | 241 | return [ |
242 | 242 | 'default' => $container->has('doctrine.dbal.db.options') |
243 | 243 | ? $container->get('doctrine.dbal.db.options') |
@@ -255,13 +255,13 @@ discard block |
||
255 | 255 | ); |
256 | 256 | |
257 | 257 | if (!$container->has('doctrine.dbal.dbs.default')) { |
258 | - $container->factory('doctrine.dbal.dbs.default', static function () use ($name) { |
|
258 | + $container->factory('doctrine.dbal.dbs.default', static function() use ($name) { |
|
259 | 259 | return $name; |
260 | 260 | }); |
261 | 261 | } |
262 | 262 | } |
263 | 263 | |
264 | - $container->factory('doctrine.dbal.dbs.options', static function () use ($tmp) { |
|
264 | + $container->factory('doctrine.dbal.dbs.options', static function() use ($tmp) { |
|
265 | 265 | return $tmp; |
266 | 266 | }); |
267 | 267 | }; |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | |
271 | 271 | private function getTypesDefinition(): \Closure |
272 | 272 | { |
273 | - return static function () { |
|
273 | + return static function() { |
|
274 | 274 | return []; |
275 | 275 | }; |
276 | 276 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | private function getOrmEmDefinition(Container $container): callable |
71 | 71 | { |
72 | - return static function () use ($container) { |
|
72 | + return static function() use ($container) { |
|
73 | 73 | $ems = $container['doctrine.orm.ems']; |
74 | 74 | |
75 | 75 | return $ems[$container['doctrine.orm.ems.default']]; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | private function getOrmEmConfigDefinition(Container $container): callable |
80 | 80 | { |
81 | - return static function () use ($container) { |
|
81 | + return static function() use ($container) { |
|
82 | 82 | $configs = $container['doctrine.orm.ems.config']; |
83 | 83 | |
84 | 84 | return $configs[$container['doctrine.orm.ems.default']]; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | private function getOrmEmFactory(Container $container): callable |
119 | 119 | { |
120 | 120 | return $container->protect( |
121 | - static function (Connection $connection, Configuration $config, EventManager $eventManager) { |
|
121 | + static function(Connection $connection, Configuration $config, EventManager $eventManager) { |
|
122 | 122 | return EntityManager::create($connection, $config, $eventManager); |
123 | 123 | } |
124 | 124 | ); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | |
127 | 127 | private function getOrmEmsDefinition(Container $container): callable |
128 | 128 | { |
129 | - return static function () use ($container) { |
|
129 | + return static function() use ($container) { |
|
130 | 130 | $container['doctrine.orm.ems.options.initializer'](); |
131 | 131 | |
132 | 132 | $ems = new Container(); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $config = $container['doctrine.orm.ems.config'][$name]; |
138 | 138 | } |
139 | 139 | |
140 | - $ems[$name] = static function () use ($container, $options, $config) { |
|
140 | + $ems[$name] = static function() use ($container, $options, $config) { |
|
141 | 141 | return $container['doctrine.orm.em.factory']( |
142 | 142 | $container['doctrine.dbal.dbs'][$options['connection']], |
143 | 143 | $config, |
@@ -152,12 +152,12 @@ discard block |
||
152 | 152 | |
153 | 153 | private function getOrmEmsConfigDefinition(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(); |
159 | 159 | foreach ($container['doctrine.orm.ems.options'] as $name => $options) { |
160 | - $configs[$name] = function () use ($container, $options) { |
|
160 | + $configs[$name] = function() use ($container, $options) { |
|
161 | 161 | $connectionName = $options['connection']; |
162 | 162 | |
163 | 163 | $config = new Configuration(); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | |
252 | 252 | private function getOrmEmsNameDefinition(Container $container): callable |
253 | 253 | { |
254 | - return static function () use ($container) { |
|
254 | + return static function() use ($container) { |
|
255 | 255 | $container['doctrine.orm.ems.options.initializer'](); |
256 | 256 | |
257 | 257 | return array_keys($container['doctrine.orm.ems.options']); |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | private function getOrmEmsOptionsInitializerDefinition(Container $container): callable |
262 | 262 | { |
263 | - return $container->protect(static function () use ($container): void { |
|
263 | + return $container->protect(static function() use ($container): void { |
|
264 | 264 | static $initialized = false; |
265 | 265 | |
266 | 266 | if ($initialized) { |
@@ -290,42 +290,42 @@ discard block |
||
290 | 290 | |
291 | 291 | private function getOrmEntityListenerResolverDefinition(): callable |
292 | 292 | { |
293 | - return static function () { |
|
293 | + return static function() { |
|
294 | 294 | return new DefaultEntityListenerResolver(); |
295 | 295 | }; |
296 | 296 | } |
297 | 297 | |
298 | 298 | private function getOrmManagerRegistryDefintion(Container $container): callable |
299 | 299 | { |
300 | - return static function () use ($container) { |
|
300 | + return static function() use ($container) { |
|
301 | 301 | return new DoctrineOrmManagerRegistry($container); |
302 | 302 | }; |
303 | 303 | } |
304 | 304 | |
305 | 305 | private function getOrmMappingDriverFactoryAnnotation(Container $container): callable |
306 | 306 | { |
307 | - return $container->protect(static function (array $mapping, Configuration $config) { |
|
307 | + return $container->protect(static function(array $mapping, Configuration $config) { |
|
308 | 308 | return $config->newDefaultAnnotationDriver($mapping['path'], false); |
309 | 309 | }); |
310 | 310 | } |
311 | 311 | |
312 | 312 | private function getOrmMappingDriverFactoryClassMap(Container $container): callable |
313 | 313 | { |
314 | - return $container->protect(static function (array $mapping) { |
|
314 | + return $container->protect(static function(array $mapping) { |
|
315 | 315 | return new ClassMapDriver($mapping['map']); |
316 | 316 | }); |
317 | 317 | } |
318 | 318 | |
319 | 319 | private function getOrmMappingDriverFactoryPhp(Container $container): callable |
320 | 320 | { |
321 | - return $container->protect(static function (array $mapping) { |
|
321 | + return $container->protect(static function(array $mapping) { |
|
322 | 322 | return new PHPDriver($mapping['path']); |
323 | 323 | }); |
324 | 324 | } |
325 | 325 | |
326 | 326 | private function getOrmMappingDriverFactorySimpleYaml(Container $container): callable |
327 | 327 | { |
328 | - return $container->protect(static function (array $mapping) { |
|
328 | + return $container->protect(static function(array $mapping) { |
|
329 | 329 | return new SimplifiedYamlDriver( |
330 | 330 | [$mapping['path'] => $mapping['namespace']], |
331 | 331 | $mapping['extension'] ?? SimplifiedYamlDriver::DEFAULT_FILE_EXTENSION |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | |
336 | 336 | private function getOrmMappingDriverFactorySimpleXml(Container $container): callable |
337 | 337 | { |
338 | - return $container->protect(static function (array $mapping) { |
|
338 | + return $container->protect(static function(array $mapping) { |
|
339 | 339 | return new SimplifiedXmlDriver( |
340 | 340 | [$mapping['path'] => $mapping['namespace']], |
341 | 341 | $mapping['extension'] ?? SimplifiedXmlDriver::DEFAULT_FILE_EXTENSION |
@@ -345,28 +345,28 @@ discard block |
||
345 | 345 | |
346 | 346 | private function getOrmMappingDriverFactoryStaticPhp(Container $container): callable |
347 | 347 | { |
348 | - return $container->protect(static function (array $mapping) { |
|
348 | + return $container->protect(static function(array $mapping) { |
|
349 | 349 | return new StaticPHPDriver($mapping['path']); |
350 | 350 | }); |
351 | 351 | } |
352 | 352 | |
353 | 353 | private function getOrmMappingDriverFactoryYaml(Container $container): callable |
354 | 354 | { |
355 | - return $container->protect(static function (array $mapping) { |
|
355 | + return $container->protect(static function(array $mapping) { |
|
356 | 356 | return new YamlDriver($mapping['path'], $mapping['extension'] ?? YamlDriver::DEFAULT_FILE_EXTENSION); |
357 | 357 | }); |
358 | 358 | } |
359 | 359 | |
360 | 360 | private function getOrmMappingDriverFactoryXml(Container $container): callable |
361 | 361 | { |
362 | - return $container->protect(static function (array $mapping) { |
|
362 | + return $container->protect(static function(array $mapping) { |
|
363 | 363 | return new XmlDriver($mapping['path'], $mapping['extension'] ?? XmlDriver::DEFAULT_FILE_EXTENSION); |
364 | 364 | }); |
365 | 365 | } |
366 | 366 | |
367 | 367 | private function getOrmMappingDriverChainDefinition(Container $container): callable |
368 | 368 | { |
369 | - return $container->protect(static function (Configuration $config, array $mappings) use ($container) { |
|
369 | + return $container->protect(static function(Configuration $config, array $mappings) use ($container) { |
|
370 | 370 | $chain = new MappingDriverChain(); |
371 | 371 | foreach ($mappings as $mapping) { |
372 | 372 | if (isset($mapping['alias'])) { |
@@ -384,21 +384,21 @@ discard block |
||
384 | 384 | |
385 | 385 | private function getOrmRepositoryFactoryDefinition(): callable |
386 | 386 | { |
387 | - return static function () { |
|
387 | + return static function() { |
|
388 | 388 | return new DefaultRepositoryFactory(); |
389 | 389 | }; |
390 | 390 | } |
391 | 391 | |
392 | 392 | private function getOrmNamingStrategyDefinition(): callable |
393 | 393 | { |
394 | - return static function () { |
|
394 | + return static function() { |
|
395 | 395 | return new DefaultNamingStrategy(); |
396 | 396 | }; |
397 | 397 | } |
398 | 398 | |
399 | 399 | private function getOrmQuoteStrategyDefinition(): callable |
400 | 400 | { |
401 | - return static function () { |
|
401 | + return static function() { |
|
402 | 402 | return new DefaultQuoteStrategy(); |
403 | 403 | }; |
404 | 404 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | private function getOrmEmDefinition(): \Closure |
64 | 64 | { |
65 | - return static function (ContainerInterface $container) { |
|
65 | + return static function(ContainerInterface $container) { |
|
66 | 66 | /** @var ContainerInterface $ems */ |
67 | 67 | $ems = $container->get('doctrine.orm.ems'); |
68 | 68 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | private function getOrmEmConfigDefinition(): \Closure |
74 | 74 | { |
75 | - return static function (ContainerInterface $container) { |
|
75 | + return static function(ContainerInterface $container) { |
|
76 | 76 | /** @var ContainerInterface $configs */ |
77 | 77 | $configs = $container->get('doctrine.orm.ems.config'); |
78 | 78 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | private function getOrmEmDefaultOptions(): \Closure |
84 | 84 | { |
85 | - return static function () { |
|
85 | + return static function() { |
|
86 | 86 | return [ |
87 | 87 | 'cache.hydration' => ['type' => 'array'], |
88 | 88 | 'cache.metadata' => ['type' => 'array'], |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | |
112 | 112 | private function getOrmEmFactory(): \Closure |
113 | 113 | { |
114 | - return static function () { |
|
115 | - return static function (Connection $connection, Configuration $config, EventManager $eventManager) { |
|
114 | + return static function() { |
|
115 | + return static function(Connection $connection, Configuration $config, EventManager $eventManager) { |
|
116 | 116 | return EntityManager::create($connection, $config, $eventManager); |
117 | 117 | }; |
118 | 118 | }; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | private function getOrmEmsDefinition(): \Closure |
122 | 122 | { |
123 | - return static function (ContainerInterface $container) { |
|
123 | + return static function(ContainerInterface $container) { |
|
124 | 124 | $container->get('doctrine.orm.ems.options.initializer')(); |
125 | 125 | |
126 | 126 | $ems = new Container(); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $config = $container->get('doctrine.orm.ems.config')->get($name); |
132 | 132 | } |
133 | 133 | |
134 | - $ems->factory($name, static function () use ($container, $options, $config) { |
|
134 | + $ems->factory($name, static function() use ($container, $options, $config) { |
|
135 | 135 | return $container->get('doctrine.orm.em.factory')( |
136 | 136 | $container->get('doctrine.dbal.dbs')->get($options['connection']), |
137 | 137 | $config, |
@@ -146,12 +146,12 @@ discard block |
||
146 | 146 | |
147 | 147 | private function getOrmEmsConfigDefinition(): \Closure |
148 | 148 | { |
149 | - return function (ContainerInterface $container) { |
|
149 | + return function(ContainerInterface $container) { |
|
150 | 150 | $container->get('doctrine.orm.ems.options.initializer')(); |
151 | 151 | |
152 | 152 | $configs = new Container(); |
153 | 153 | foreach ($container->get('doctrine.orm.ems.options') as $name => $options) { |
154 | - $configs->factory($name, function () use ($container, $options) { |
|
154 | + $configs->factory($name, function() use ($container, $options) { |
|
155 | 155 | $connectionName = $options['connection']; |
156 | 156 | |
157 | 157 | $config = new Configuration(); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | |
248 | 248 | private function getOrmEmsNameDefinition(): \Closure |
249 | 249 | { |
250 | - return static function (ContainerInterface $container) { |
|
250 | + return static function(ContainerInterface $container) { |
|
251 | 251 | $container->get('doctrine.orm.ems.options.initializer')(); |
252 | 252 | |
253 | 253 | return array_keys($container->get('doctrine.orm.ems.options')); |
@@ -256,8 +256,8 @@ discard block |
||
256 | 256 | |
257 | 257 | private function getOrmEmsOptionsInitializerDefinition(): \Closure |
258 | 258 | { |
259 | - return static function (ContainerInterface $container) { |
|
260 | - return static function () use ($container): void { |
|
259 | + return static function(ContainerInterface $container) { |
|
260 | + return static function() use ($container): void { |
|
261 | 261 | static $initialized = false; |
262 | 262 | |
263 | 263 | if ($initialized) { |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $initialized = true; |
268 | 268 | |
269 | 269 | if (!$container->has('doctrine.orm.ems.options')) { |
270 | - $container->factory('doctrine.orm.ems.options', static function (ContainerInterface $container) { |
|
270 | + $container->factory('doctrine.orm.ems.options', static function(ContainerInterface $container) { |
|
271 | 271 | return [ |
272 | 272 | 'default' => $container->has('doctrine.orm.em.options') |
273 | 273 | ? $container->get('doctrine.orm.em.options') |
@@ -281,13 +281,13 @@ discard block |
||
281 | 281 | $options = array_replace($container->get('doctrine.orm.em.default_options'), $options); |
282 | 282 | |
283 | 283 | if (!$container->has('doctrine.orm.ems.default')) { |
284 | - $container->factory('doctrine.orm.ems.default', static function () use ($name) { |
|
284 | + $container->factory('doctrine.orm.ems.default', static function() use ($name) { |
|
285 | 285 | return $name; |
286 | 286 | }); |
287 | 287 | } |
288 | 288 | } |
289 | 289 | |
290 | - $container->factory('doctrine.orm.ems.options', static function () use ($tmp) { |
|
290 | + $container->factory('doctrine.orm.ems.options', static function() use ($tmp) { |
|
291 | 291 | return $tmp; |
292 | 292 | }); |
293 | 293 | }; |
@@ -296,22 +296,22 @@ discard block |
||
296 | 296 | |
297 | 297 | private function getOrmEntityListenerResolverDefinition(): \Closure |
298 | 298 | { |
299 | - return static function () { |
|
299 | + return static function() { |
|
300 | 300 | return new DefaultEntityListenerResolver(); |
301 | 301 | }; |
302 | 302 | } |
303 | 303 | |
304 | 304 | private function getOrmManagerRegistryDefintion(): \Closure |
305 | 305 | { |
306 | - return static function (ContainerInterface $container) { |
|
306 | + return static function(ContainerInterface $container) { |
|
307 | 307 | return new DoctrineOrmManagerRegistry($container); |
308 | 308 | }; |
309 | 309 | } |
310 | 310 | |
311 | 311 | private function getOrmMappingDriverFactoryAnnotation(): \Closure |
312 | 312 | { |
313 | - return static function () { |
|
314 | - return static function (array $mapping, Configuration $config) { |
|
313 | + return static function() { |
|
314 | + return static function(array $mapping, Configuration $config) { |
|
315 | 315 | return $config->newDefaultAnnotationDriver($mapping['path'], false); |
316 | 316 | }; |
317 | 317 | }; |
@@ -319,8 +319,8 @@ discard block |
||
319 | 319 | |
320 | 320 | private function getOrmMappingDriverFactoryClassMap(): \Closure |
321 | 321 | { |
322 | - return static function () { |
|
323 | - return static function (array $mapping) { |
|
322 | + return static function() { |
|
323 | + return static function(array $mapping) { |
|
324 | 324 | return new ClassMapDriver($mapping['map']); |
325 | 325 | }; |
326 | 326 | }; |
@@ -328,8 +328,8 @@ discard block |
||
328 | 328 | |
329 | 329 | private function getOrmMappingDriverFactoryPhp(): \Closure |
330 | 330 | { |
331 | - return static function () { |
|
332 | - return static function (array $mapping) { |
|
331 | + return static function() { |
|
332 | + return static function(array $mapping) { |
|
333 | 333 | return new PHPDriver($mapping['path']); |
334 | 334 | }; |
335 | 335 | }; |
@@ -337,8 +337,8 @@ discard block |
||
337 | 337 | |
338 | 338 | private function getOrmMappingDriverFactorySimpleYaml(): \Closure |
339 | 339 | { |
340 | - return static function () { |
|
341 | - return static function (array $mapping) { |
|
340 | + return static function() { |
|
341 | + return static function(array $mapping) { |
|
342 | 342 | return new SimplifiedYamlDriver( |
343 | 343 | [$mapping['path'] => $mapping['namespace']], |
344 | 344 | $mapping['extension'] ?? SimplifiedYamlDriver::DEFAULT_FILE_EXTENSION |
@@ -349,8 +349,8 @@ discard block |
||
349 | 349 | |
350 | 350 | private function getOrmMappingDriverFactorySimpleXml(): \Closure |
351 | 351 | { |
352 | - return static function () { |
|
353 | - return static function (array $mapping) { |
|
352 | + return static function() { |
|
353 | + return static function(array $mapping) { |
|
354 | 354 | return new SimplifiedXmlDriver( |
355 | 355 | [$mapping['path'] => $mapping['namespace']], |
356 | 356 | $mapping['extension'] ?? SimplifiedXmlDriver::DEFAULT_FILE_EXTENSION |
@@ -361,8 +361,8 @@ discard block |
||
361 | 361 | |
362 | 362 | private function getOrmMappingDriverFactoryStaticPhp(): \Closure |
363 | 363 | { |
364 | - return static function () { |
|
365 | - return static function (array $mapping) { |
|
364 | + return static function() { |
|
365 | + return static function(array $mapping) { |
|
366 | 366 | return new StaticPHPDriver($mapping['path']); |
367 | 367 | }; |
368 | 368 | }; |
@@ -370,8 +370,8 @@ discard block |
||
370 | 370 | |
371 | 371 | private function getOrmMappingDriverFactoryYaml(): \Closure |
372 | 372 | { |
373 | - return static function () { |
|
374 | - return static function (array $mapping) { |
|
373 | + return static function() { |
|
374 | + return static function(array $mapping) { |
|
375 | 375 | return new YamlDriver($mapping['path'], $mapping['extension'] ?? YamlDriver::DEFAULT_FILE_EXTENSION); |
376 | 376 | }; |
377 | 377 | }; |
@@ -379,8 +379,8 @@ discard block |
||
379 | 379 | |
380 | 380 | private function getOrmMappingDriverFactoryXml(): \Closure |
381 | 381 | { |
382 | - return static function () { |
|
383 | - return static function (array $mapping) { |
|
382 | + return static function() { |
|
383 | + return static function(array $mapping) { |
|
384 | 384 | return new XmlDriver($mapping['path'], $mapping['extension'] ?? XmlDriver::DEFAULT_FILE_EXTENSION); |
385 | 385 | }; |
386 | 386 | }; |
@@ -388,8 +388,8 @@ discard block |
||
388 | 388 | |
389 | 389 | private function getOrmMappingDriverChainDefinition(): \Closure |
390 | 390 | { |
391 | - return static function (ContainerInterface $container) { |
|
392 | - return static function (Configuration $config, array $mappings) use ($container) { |
|
391 | + return static function(ContainerInterface $container) { |
|
392 | + return static function(Configuration $config, array $mappings) use ($container) { |
|
393 | 393 | $chain = new MappingDriverChain(); |
394 | 394 | foreach ($mappings as $mapping) { |
395 | 395 | if (isset($mapping['alias'])) { |
@@ -408,21 +408,21 @@ discard block |
||
408 | 408 | |
409 | 409 | private function getOrmRepositoryFactoryDefinition(): \Closure |
410 | 410 | { |
411 | - return static function () { |
|
411 | + return static function() { |
|
412 | 412 | return new DefaultRepositoryFactory(); |
413 | 413 | }; |
414 | 414 | } |
415 | 415 | |
416 | 416 | private function getOrmNamingStrategyDefinition(): \Closure |
417 | 417 | { |
418 | - return static function () { |
|
418 | + return static function() { |
|
419 | 419 | return new DefaultNamingStrategy(); |
420 | 420 | }; |
421 | 421 | } |
422 | 422 | |
423 | 423 | private function getOrmQuoteStrategyDefinition(): \Closure |
424 | 424 | { |
425 | - return static function () { |
|
425 | + return static function() { |
|
426 | 426 | return new DefaultQuoteStrategy(); |
427 | 427 | }; |
428 | 428 | } |