@@ -62,9 +62,9 @@ discard block |
||
| 62 | 62 | ->useAttributeAsKey('service') |
| 63 | 63 | ->defaultValue([]) |
| 64 | 64 | ->validate() |
| 65 | - ->ifTrue(static function ($v) { |
|
| 66 | - return count(array_filter(array_keys($v), static function (string $doctrineService) : bool { |
|
| 67 | - return strpos($doctrineService, 'Doctrine\Migrations\\') !==0; |
|
| 65 | + ->ifTrue(static function($v) { |
|
| 66 | + return count(array_filter(array_keys($v), static function(string $doctrineService) : bool { |
|
| 67 | + return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0; |
|
| 68 | 68 | })); |
| 69 | 69 | }) |
| 70 | 70 | ->thenInvalid('Valid services for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.') |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | ->defaultValue(false) |
| 124 | 124 | ->info('Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false') |
| 125 | 125 | ->validate() |
| 126 | - ->ifTrue(static function ($v) use ($organizeMigrationModes) { |
|
| 126 | + ->ifTrue(static function($v) use ($organizeMigrationModes) { |
|
| 127 | 127 | if ($v === false) { |
| 128 | 128 | return false; |
| 129 | 129 | } |
@@ -138,8 +138,8 @@ discard block |
||
| 138 | 138 | ->end() |
| 139 | 139 | ->validate() |
| 140 | 140 | ->ifString() |
| 141 | - ->then(static function ($v) { |
|
| 142 | - return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_' . strtoupper($v)); |
|
| 141 | + ->then(static function($v) { |
|
| 142 | + return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_'.strtoupper($v)); |
|
| 143 | 143 | }) |
| 144 | 144 | ->end() |
| 145 | 145 | ->end() |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | 'kernel.bundles' => [], |
| 90 | 90 | 'kernel.cache_dir' => sys_get_temp_dir(), |
| 91 | 91 | 'kernel.environment' => 'test', |
| 92 | - 'kernel.project_dir' => __DIR__ . '/../', |
|
| 92 | + 'kernel.project_dir' => __DIR__.'/../', |
|
| 93 | 93 | ])); |
| 94 | 94 | |
| 95 | 95 | $kernel = $this->getKernel($container); |
@@ -17,6 +17,6 @@ |
||
| 17 | 17 | { |
| 18 | 18 | public function build(ContainerBuilder $builder) |
| 19 | 19 | { |
| 20 | - $builder->addCompilerPass(new ConfigureDependencyFactoryPass()); |
|
| 20 | + $builder->addCompilerPass(new ConfigureDependencyFactoryPass()); |
|
| 21 | 21 | } |
| 22 | 22 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | $container->setAlias('doctrine.migrations.configuration.test', new Alias('doctrine.migrations.configuration', true)); |
| 44 | 44 | |
| 45 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Fixtures')); |
|
| 45 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Fixtures')); |
|
| 46 | 46 | $loader->load('conf.xml'); |
| 47 | 47 | |
| 48 | 48 | $container->compile(); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | self::assertInstanceOf(Configuration::class, $config); |
| 122 | 122 | self::assertSame([ |
| 123 | 123 | 'DoctrineMigrationsTest' => $bundle->getPath(), |
| 124 | - 'DoctrineMigrationsTestAnother' => $bundle->getPath() . '/another-path', |
|
| 124 | + 'DoctrineMigrationsTestAnother' => $bundle->getPath().'/another-path', |
|
| 125 | 125 | |
| 126 | 126 | ], $config->getMigrationDirectories()); |
| 127 | 127 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | public function testCustomSorter() : void |
| 154 | 154 | { |
| 155 | - $config = [ |
|
| 155 | + $config = [ |
|
| 156 | 156 | 'migrations_paths' => ['DoctrineMigrationsTest' => 'a'], |
| 157 | 157 | 'services' => [Comparator::class => 'my_sorter'], |
| 158 | 158 | ]; |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | $conn = $this->createMock(Connection::class); |
| 162 | 162 | $container->set('doctrine.dbal.default_connection', $conn); |
| 163 | 163 | |
| 164 | - $sorter = new class() implements Comparator{ |
|
| 164 | + $sorter = new class() implements Comparator { |
|
| 165 | 165 | public function compare(Version $a, Version $b) : int |
| 166 | 166 | { |
| 167 | 167 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | public function testCustomConnection() : void |
| 179 | 179 | { |
| 180 | - $config = [ |
|
| 180 | + $config = [ |
|
| 181 | 181 | 'migrations_paths' => ['DoctrineMigrationsTest' => 'a'], |
| 182 | 182 | 'connection' => 'custom', |
| 183 | 183 | ]; |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | public function testCustomEntityManager() : void |
| 216 | 216 | { |
| 217 | - $config = [ |
|
| 217 | + $config = [ |
|
| 218 | 218 | 'em' => 'custom', |
| 219 | 219 | 'migrations_paths' => ['DoctrineMigrationsTest' => 'a'], |
| 220 | 220 | ]; |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | $this->expectException(InvalidConfigurationException::class); |
| 264 | 264 | $this->expectExceptionMessage('Invalid configuration for path "doctrine_migrations.services": Valid services for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.'); |
| 265 | 265 | |
| 266 | - $config = [ |
|
| 266 | + $config = [ |
|
| 267 | 267 | 'migrations_paths' => ['DoctrineMigrationsTest' => 'a'], |
| 268 | 268 | 'services' => ['foo' => 'mock_storage_service'], |
| 269 | 269 | ]; |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | ], |
| 326 | 326 | 'kernel.cache_dir' => sys_get_temp_dir(), |
| 327 | 327 | 'kernel.environment' => 'test', |
| 328 | - 'kernel.project_dir' => __DIR__ . '/../', |
|
| 328 | + 'kernel.project_dir' => __DIR__.'/../', |
|
| 329 | 329 | ])); |
| 330 | 330 | } |
| 331 | 331 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $config = $this->processConfiguration($configuration, $configs); |
| 40 | 40 | |
| 41 | - $locator = new FileLocator(__DIR__ . '/../Resources/config/'); |
|
| 41 | + $locator = new FileLocator(__DIR__.'/../Resources/config/'); |
|
| 42 | 42 | $loader = new XmlFileLoader($container, $locator); |
| 43 | 43 | |
| 44 | 44 | $loader->load('services.xml'); |
@@ -71,26 +71,26 @@ discard block |
||
| 71 | 71 | $diDefinition->addMethodCall('setDefinition', [$doctrineId, new ServiceClosureArgument(new Reference($symfonyId))]); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if (! isset($config['services'][MetadataStorage::class])) { |
|
| 74 | + if (!isset($config['services'][MetadataStorage::class])) { |
|
| 75 | 75 | $storageConfiguration = $config['storage']['table_storage']; |
| 76 | 76 | |
| 77 | 77 | $storageDefinition = new Definition(TableMetadataStorageConfiguration::class); |
| 78 | 78 | $container->setDefinition('doctrine.migrations.storage.table_storage', $storageDefinition); |
| 79 | 79 | $container->setAlias('doctrine.migrations.metadata_storage', 'doctrine.migrations.storage.table_storage'); |
| 80 | 80 | |
| 81 | - if ($storageConfiguration['table_name']!== null) { |
|
| 81 | + if ($storageConfiguration['table_name'] !== null) { |
|
| 82 | 82 | $storageDefinition->addMethodCall('setTableName', [$storageConfiguration['table_name']]); |
| 83 | 83 | } |
| 84 | - if ($storageConfiguration['version_column_name']!== null) { |
|
| 84 | + if ($storageConfiguration['version_column_name'] !== null) { |
|
| 85 | 85 | $storageDefinition->addMethodCall('setVersionColumnName', [$storageConfiguration['version_column_name']]); |
| 86 | 86 | } |
| 87 | - if ($storageConfiguration['version_column_length']!== null) { |
|
| 87 | + if ($storageConfiguration['version_column_length'] !== null) { |
|
| 88 | 88 | $storageDefinition->addMethodCall('setVersionColumnLength', [$storageConfiguration['version_column_length']]); |
| 89 | 89 | } |
| 90 | - if ($storageConfiguration['executed_at_column_name']!== null) { |
|
| 90 | + if ($storageConfiguration['executed_at_column_name'] !== null) { |
|
| 91 | 91 | $storageDefinition->addMethodCall('setExecutedAtColumnName', [$storageConfiguration['executed_at_column_name']]); |
| 92 | 92 | } |
| 93 | - if ($storageConfiguration['execution_time_column_name']!== null) { |
|
| 93 | + if ($storageConfiguration['execution_time_column_name'] !== null) { |
|
| 94 | 94 | $storageDefinition->addMethodCall('setExecutionTimeColumnName', [$storageConfiguration['execution_time_column_name']]); |
| 95 | 95 | } |
| 96 | 96 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $bundleName = substr($pathParts[0], 1); |
| 115 | 115 | |
| 116 | 116 | $bundlePath = $this->getBundlePath($bundleName, $container); |
| 117 | - return $bundlePath . substr($path, strlen('@' . $bundleName)); |
|
| 117 | + return $bundlePath.substr($path, strlen('@'.$bundleName)); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | return $path; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | { |
| 125 | 125 | $bundleMetadata = $container->getParameter('kernel.bundles_metadata'); |
| 126 | 126 | |
| 127 | - if (! isset($bundleMetadata[$bundleName])) { |
|
| 127 | + if (!isset($bundleMetadata[$bundleName])) { |
|
| 128 | 128 | throw new RuntimeException(sprintf( |
| 129 | 129 | 'The bundle "%s" has not been registered, available bundles: %s', |
| 130 | 130 | $bundleName, |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | public function getXsdValidationBasePath() : string |
| 144 | 144 | { |
| 145 | - return __DIR__ . '/../Resources/config/schema'; |
|
| 145 | + return __DIR__.'/../Resources/config/schema'; |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | public function getNamespace() : string |