@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | public function __invoke(): array |
| 22 | 22 | { |
| 23 | 23 | return [ |
| 24 | - 'doctrine.dbal.connection_registry' => static function (ContainerInterface $container) { |
|
| 24 | + 'doctrine.dbal.connection_registry' => static function(ContainerInterface $container) { |
|
| 25 | 25 | $container->get('doctrine.dbal.dbs.options.initializer')(); |
| 26 | 26 | |
| 27 | 27 | return new DoctrineDbalPsrConnectionRegistry( |
@@ -29,29 +29,29 @@ discard block |
||
| 29 | 29 | array_keys($container->get('doctrine.dbal.dbs.options')) |
| 30 | 30 | ); |
| 31 | 31 | }, |
| 32 | - 'doctrine.dbal.db' => static function (ContainerInterface $container) { |
|
| 32 | + 'doctrine.dbal.db' => static function(ContainerInterface $container) { |
|
| 33 | 33 | /** @var Container $dbs */ |
| 34 | 34 | $dbs = $container->get('doctrine.dbal.dbs'); |
| 35 | 35 | |
| 36 | 36 | return $dbs->get($container->get('doctrine.dbal.dbs.default')); |
| 37 | 37 | }, |
| 38 | - 'doctrine.dbal.db.cache_factory.apcu' => static function () { |
|
| 39 | - return static function () { |
|
| 38 | + 'doctrine.dbal.db.cache_factory.apcu' => static function() { |
|
| 39 | + return static function() { |
|
| 40 | 40 | return new ApcuCache(); |
| 41 | 41 | }; |
| 42 | 42 | }, |
| 43 | - 'doctrine.dbal.db.cache_factory.array' => static function () { |
|
| 44 | - return static function () { |
|
| 43 | + 'doctrine.dbal.db.cache_factory.array' => static function() { |
|
| 44 | + return static function() { |
|
| 45 | 45 | return new ArrayCache(); |
| 46 | 46 | }; |
| 47 | 47 | }, |
| 48 | - 'doctrine.dbal.db.config' => static function (ContainerInterface $container) { |
|
| 48 | + 'doctrine.dbal.db.config' => static function(ContainerInterface $container) { |
|
| 49 | 49 | /** @var Container $dbsConfigs */ |
| 50 | 50 | $dbsConfigs = $container->get('doctrine.dbal.dbs.config'); |
| 51 | 51 | |
| 52 | 52 | return $dbsConfigs->get($container->get('doctrine.dbal.dbs.default')); |
| 53 | 53 | }, |
| 54 | - 'doctrine.dbal.db.default_options' => static function () { |
|
| 54 | + 'doctrine.dbal.db.default_options' => static function() { |
|
| 55 | 55 | return [ |
| 56 | 56 | 'configuration' => [ |
| 57 | 57 | 'auto_commit' => true, |
@@ -71,13 +71,13 @@ discard block |
||
| 71 | 71 | ], |
| 72 | 72 | ]; |
| 73 | 73 | }, |
| 74 | - 'doctrine.dbal.db.event_manager' => static function (ContainerInterface $container) { |
|
| 74 | + 'doctrine.dbal.db.event_manager' => static function(ContainerInterface $container) { |
|
| 75 | 75 | /** @var Container $dbEvents */ |
| 76 | 76 | $dbEvents = $container->get('doctrine.dbal.dbs.event_manager'); |
| 77 | 77 | |
| 78 | 78 | return $dbEvents->get($container->get('doctrine.dbal.dbs.default')); |
| 79 | 79 | }, |
| 80 | - 'doctrine.dbal.dbs' => static function (ContainerInterface $container) { |
|
| 80 | + 'doctrine.dbal.dbs' => static function(ContainerInterface $container) { |
|
| 81 | 81 | $container->get('doctrine.dbal.dbs.options.initializer')(); |
| 82 | 82 | |
| 83 | 83 | $dbs = new Container(); |
@@ -90,19 +90,19 @@ discard block |
||
| 90 | 90 | $manager = $container->get('doctrine.dbal.dbs.event_manager')->get($name); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - $dbs->factory($name, static function () use ($options, $config, $manager) { |
|
| 93 | + $dbs->factory($name, static function() use ($options, $config, $manager) { |
|
| 94 | 94 | return DriverManager::getConnection($options['connection'], $config, $manager); |
| 95 | 95 | }); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | return $dbs; |
| 99 | 99 | }, |
| 100 | - 'doctrine.dbal.dbs.config' => static function (ContainerInterface $container) { |
|
| 100 | + 'doctrine.dbal.dbs.config' => static function(ContainerInterface $container) { |
|
| 101 | 101 | $container->get('doctrine.dbal.dbs.options.initializer')(); |
| 102 | 102 | |
| 103 | 103 | $logger = $container->has('logger') ? $container->get('logger') : null; |
| 104 | 104 | |
| 105 | - $cache = function (array $cacheDefinition) use ($container): Cache { |
|
| 105 | + $cache = function(array $cacheDefinition) use ($container): Cache { |
|
| 106 | 106 | $cacheType = $cacheDefinition['type']; |
| 107 | 107 | $cacheOptions = $cacheDefinition['options'] ?? []; |
| 108 | 108 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | $configs = new Container(); |
| 115 | 115 | foreach ($container->get('doctrine.dbal.dbs.options') as $name => $options) { |
| 116 | - $configs->factory($name, function () use ($logger, $cache, $options) { |
|
| 116 | + $configs->factory($name, function() use ($logger, $cache, $options) { |
|
| 117 | 117 | $configOptions = $options['configuration']; |
| 118 | 118 | |
| 119 | 119 | $config = new Configuration(); |
@@ -141,20 +141,20 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | return $configs; |
| 143 | 143 | }, |
| 144 | - 'doctrine.dbal.dbs.event_manager' => static function (ContainerInterface $container) { |
|
| 144 | + 'doctrine.dbal.dbs.event_manager' => static function(ContainerInterface $container) { |
|
| 145 | 145 | $container->get('doctrine.dbal.dbs.options.initializer')(); |
| 146 | 146 | |
| 147 | 147 | $managers = new Container(); |
| 148 | 148 | foreach (array_keys($container->get('doctrine.dbal.dbs.options')) as $name) { |
| 149 | - $managers->factory($name, static function () { |
|
| 149 | + $managers->factory($name, static function() { |
|
| 150 | 150 | return new EventManager(); |
| 151 | 151 | }); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | return $managers; |
| 155 | 155 | }, |
| 156 | - 'doctrine.dbal.dbs.options.initializer' => static function (ContainerInterface $container) { |
|
| 157 | - return static function () use ($container): void { |
|
| 156 | + 'doctrine.dbal.dbs.options.initializer' => static function(ContainerInterface $container) { |
|
| 157 | + return static function() use ($container): void { |
|
| 158 | 158 | static $initialized = false; |
| 159 | 159 | |
| 160 | 160 | if ($initialized) { |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | if (!$container->has('doctrine.dbal.dbs.options')) { |
| 175 | - $container->factory('doctrine.dbal.dbs.options', static function (ContainerInterface $container) { |
|
| 175 | + $container->factory('doctrine.dbal.dbs.options', static function(ContainerInterface $container) { |
|
| 176 | 176 | return [ |
| 177 | 177 | 'default' => $container->has('doctrine.dbal.db.options') |
| 178 | 178 | ? $container->get('doctrine.dbal.db.options') |
@@ -189,18 +189,18 @@ discard block |
||
| 189 | 189 | ); |
| 190 | 190 | |
| 191 | 191 | if (!$container->has('doctrine.dbal.dbs.default')) { |
| 192 | - $container->factory('doctrine.dbal.dbs.default', function () use ($name) { |
|
| 192 | + $container->factory('doctrine.dbal.dbs.default', function() use ($name) { |
|
| 193 | 193 | return $name; |
| 194 | 194 | }); |
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - $container->factory('doctrine.dbal.dbs.options', function () use ($tmp) { |
|
| 198 | + $container->factory('doctrine.dbal.dbs.options', function() use ($tmp) { |
|
| 199 | 199 | return $tmp; |
| 200 | 200 | }); |
| 201 | 201 | }; |
| 202 | 202 | }, |
| 203 | - 'doctrine.dbal.types' => function () { |
|
| 203 | + 'doctrine.dbal.types' => function() { |
|
| 204 | 204 | return []; |
| 205 | 205 | }, |
| 206 | 206 | ]; |