@@ -32,7 +32,7 @@ |
||
| 32 | 32 | 'kernel.bundles' => [], |
| 33 | 33 | 'kernel.cache_dir' => sys_get_temp_dir(), |
| 34 | 34 | 'kernel.environment' => 'test', |
| 35 | - 'kernel.root_dir' => __DIR__ . '/../../', // src dir |
|
| 35 | + 'kernel.root_dir' => __DIR__.'/../../', // src dir |
|
| 36 | 36 | ])); |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ->scalarNode('organize_migrations')->defaultValue(false) |
| 47 | 47 | ->info('Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false') |
| 48 | 48 | ->validate() |
| 49 | - ->ifTrue(static function ($v) use ($organizeMigrationModes) { |
|
| 49 | + ->ifTrue(static function($v) use ($organizeMigrationModes) { |
|
| 50 | 50 | if ($v === false) { |
| 51 | 51 | return false; |
| 52 | 52 | } |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | ->end() |
| 62 | 62 | ->validate() |
| 63 | 63 | ->ifString() |
| 64 | - ->then(static function ($v) { |
|
| 65 | - return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_' . strtoupper($v)); |
|
| 64 | + ->then(static function($v) { |
|
| 65 | + return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_'.strtoupper($v)); |
|
| 66 | 66 | }) |
| 67 | 67 | ->end() |
| 68 | 68 | ->end() |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | ->useAttributeAsKey('name') |
| 48 | 48 | ->defaultValue(['%kernel.root_dir%/DoctrineMigrations' => 'Application\Migrations']) |
| 49 | 49 | ->prototype('scalar')->end() |
| 50 | - ->end() |
|
| 50 | + ->end() |
|
| 51 | 51 | |
| 52 | 52 | ->arrayNode('storage') |
| 53 | 53 | ->children() |
@@ -37,10 +37,10 @@ discard block |
||
| 37 | 37 | $configurationDefinition = new Definition(MigrationsConfiguration::class); |
| 38 | 38 | $container->setDefinition('doctrine.migrations.configuration', $configurationDefinition); |
| 39 | 39 | |
| 40 | - if (! empty($config['name'])) { |
|
| 40 | + if (!empty($config['name'])) { |
|
| 41 | 41 | $configurationDefinition->addMethodCall('setName', [$config['name']]); |
| 42 | 42 | } |
| 43 | - if (! empty($config['migrations_paths'])) { |
|
| 43 | + if (!empty($config['migrations_paths'])) { |
|
| 44 | 44 | foreach ($config['migrations_paths'] as $ns => $path) { |
| 45 | 45 | $configurationDefinition->addMethodCall('addMigrationsDirectory', [$ns, $path]); |
| 46 | 46 | } |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | if (isset($config['all_or_nothing'])) { |
| 49 | 49 | $configurationDefinition->addMethodCall('setAllOrNothing', [$config['all_or_nothing']]); |
| 50 | 50 | } |
| 51 | - if (! empty($config['custom_template'])) { |
|
| 51 | + if (!empty($config['custom_template'])) { |
|
| 52 | 52 | $configurationDefinition->setCustomTemplate('setName', [$config['custom_template']]); |
| 53 | 53 | } |
| 54 | - if (! empty($config['organize_migrations'])) { |
|
| 54 | + if (!empty($config['organize_migrations'])) { |
|
| 55 | 55 | $configurationDefinition->addMethodCall('setMigrationOrganization', [$config['organize_migrations']]); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -59,43 +59,43 @@ discard block |
||
| 59 | 59 | $configurationDefinition->addMethodCall('setCheckDatabasePlatform', [$config['check_database_platform']]); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - if (! empty($config['migrations'])) { |
|
| 62 | + if (!empty($config['migrations'])) { |
|
| 63 | 63 | foreach ($config['migrations'] as $migrationClass) { |
| 64 | 64 | $configurationDefinition->addMethodCall('addMigrationClass', [$migrationClass]); |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - if (! empty($config['storage']['table_storage'])) { |
|
| 68 | + if (!empty($config['storage']['table_storage'])) { |
|
| 69 | 69 | $sConf = $config['storage']['table_storage']; |
| 70 | 70 | |
| 71 | 71 | $storageDefinition = new Definition(TableMetadataStorageConfiguration::class); |
| 72 | 72 | $container->setDefinition('doctrine.migrations.storage.table_storage', $storageDefinition); |
| 73 | 73 | $container->setAlias('doctrine.migrations.metadata_storage', 'doctrine.migrations.storage.table_storage'); |
| 74 | 74 | |
| 75 | - if (! empty($sConf['table_name'])) { |
|
| 75 | + if (!empty($sConf['table_name'])) { |
|
| 76 | 76 | $storageDefinition->addMethodCall('setTableName', [$sConf['table_name']]); |
| 77 | 77 | } |
| 78 | - if (! empty($sConf['version_column_name'])) { |
|
| 78 | + if (!empty($sConf['version_column_name'])) { |
|
| 79 | 79 | $storageDefinition->addMethodCall('setVersionColumnName', [$sConf['version_column_name']]); |
| 80 | 80 | } |
| 81 | - if (! empty($sConf['version_column_length'])) { |
|
| 81 | + if (!empty($sConf['version_column_length'])) { |
|
| 82 | 82 | $storageDefinition->addMethodCall('setVersionColumnLength', [$sConf['version_column_length']]); |
| 83 | 83 | } |
| 84 | - if (! empty($sConf['executed_at_column_name'])) { |
|
| 84 | + if (!empty($sConf['executed_at_column_name'])) { |
|
| 85 | 85 | $storageDefinition->addMethodCall('setExecutedAtColumnName', [$sConf['executed_at_column_name']]); |
| 86 | 86 | } |
| 87 | - if (! empty($sConf['execution_time_column_name'])) { |
|
| 87 | + if (!empty($sConf['execution_time_column_name'])) { |
|
| 88 | 88 | $storageDefinition->addMethodCall('setExecutionTimeColumnName', [$sConf['execution_time_column_name']]); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $configurationDefinition->addMethodCall('setMetadataStorageConfiguration', [new Reference('doctrine.migrations.storage.table_storage')]); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - if (! empty($config['em']) && ! empty($config['connection'])) { |
|
| 94 | + if (!empty($config['em']) && !empty($config['connection'])) { |
|
| 95 | 95 | throw new InvalidArgumentException('You can not specify both "connection" and "em" in the DoctrineMigrationsBundle configurations.'); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - $emID = ! empty($config['em']) ? sprintf('doctrine.orm.%s_entity_manager', $config['em']) : null; |
|
| 98 | + $emID = !empty($config['em']) ? sprintf('doctrine.orm.%s_entity_manager', $config['em']) : null; |
|
| 99 | 99 | |
| 100 | 100 | if ($emID) { |
| 101 | 101 | $connectionDef = new Definition(Connection::class); |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | $container->setDefinition('doctrine.migrations.di', $diDefinition); |
| 123 | 123 | |
| 124 | - if (! empty($config['sorter'])) { |
|
| 124 | + if (!empty($config['sorter'])) { |
|
| 125 | 125 | $diDefinition->addMethodCall('setService', [DependencyFactory::MIGRATIONS_SORTER, new Reference($config['sorter'])]); |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - $locator = new FileLocator(__DIR__ . '/../Resources/config/'); |
|
| 128 | + $locator = new FileLocator(__DIR__.'/../Resources/config/'); |
|
| 129 | 129 | $loader = new XmlFileLoader($container, $locator); |
| 130 | 130 | |
| 131 | 131 | $loader->load('services.xml'); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function getXsdValidationBasePath() : string |
| 140 | 140 | { |
| 141 | - return __DIR__ . '/../Resources/config/schema'; |
|
| 141 | + return __DIR__.'/../Resources/config/schema'; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | public function getNamespace() : string |