@@ -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'); |
@@ -75,26 +75,26 @@ discard block |
||
| 75 | 75 | $diDefinition->addMethodCall('setDefinition', [$doctrineId, new Reference($symfonyId)]); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - if (! isset($config['services'][MetadataStorage::class])) { |
|
| 78 | + if (!isset($config['services'][MetadataStorage::class])) { |
|
| 79 | 79 | $storageConfiguration = $config['storage']['table_storage']; |
| 80 | 80 | |
| 81 | 81 | $storageDefinition = new Definition(TableMetadataStorageConfiguration::class); |
| 82 | 82 | $container->setDefinition('doctrine.migrations.storage.table_storage', $storageDefinition); |
| 83 | 83 | $container->setAlias('doctrine.migrations.metadata_storage', 'doctrine.migrations.storage.table_storage'); |
| 84 | 84 | |
| 85 | - if ($storageConfiguration['table_name']!== null) { |
|
| 85 | + if ($storageConfiguration['table_name'] !== null) { |
|
| 86 | 86 | $storageDefinition->addMethodCall('setTableName', [$storageConfiguration['table_name']]); |
| 87 | 87 | } |
| 88 | - if ($storageConfiguration['version_column_name']!== null) { |
|
| 88 | + if ($storageConfiguration['version_column_name'] !== null) { |
|
| 89 | 89 | $storageDefinition->addMethodCall('setVersionColumnName', [$storageConfiguration['version_column_name']]); |
| 90 | 90 | } |
| 91 | - if ($storageConfiguration['version_column_length']!== null) { |
|
| 91 | + if ($storageConfiguration['version_column_length'] !== null) { |
|
| 92 | 92 | $storageDefinition->addMethodCall('setVersionColumnLength', [$storageConfiguration['version_column_length']]); |
| 93 | 93 | } |
| 94 | - if ($storageConfiguration['executed_at_column_name']!== null) { |
|
| 94 | + if ($storageConfiguration['executed_at_column_name'] !== null) { |
|
| 95 | 95 | $storageDefinition->addMethodCall('setExecutedAtColumnName', [$storageConfiguration['executed_at_column_name']]); |
| 96 | 96 | } |
| 97 | - if ($storageConfiguration['execution_time_column_name']!== null) { |
|
| 97 | + if ($storageConfiguration['execution_time_column_name'] !== null) { |
|
| 98 | 98 | $storageDefinition->addMethodCall('setExecutionTimeColumnName', [$storageConfiguration['execution_time_column_name']]); |
| 99 | 99 | } |
| 100 | 100 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $bundleName = substr($pathParts[0], 1); |
| 119 | 119 | |
| 120 | 120 | $bundlePath = $this->getBundlePath($bundleName, $container); |
| 121 | - return $bundlePath . substr($path, strlen('@' . $bundleName)); |
|
| 121 | + return $bundlePath.substr($path, strlen('@'.$bundleName)); |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | return $path; |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | { |
| 129 | 129 | $bundleMetadata = $container->getParameter('kernel.bundles_metadata'); |
| 130 | 130 | |
| 131 | - if (! isset($bundleMetadata[$bundleName])) { |
|
| 131 | + if (!isset($bundleMetadata[$bundleName])) { |
|
| 132 | 132 | throw new RuntimeException(sprintf( |
| 133 | 133 | 'The bundle "%s" has not been registered, available bundles: %s', |
| 134 | 134 | $bundleName, |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | public function getXsdValidationBasePath() : string |
| 148 | 148 | { |
| 149 | - return __DIR__ . '/../Resources/config/schema'; |
|
| 149 | + return __DIR__.'/../Resources/config/schema'; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | public function getNamespace() : string |
@@ -58,9 +58,9 @@ discard block |
||
| 58 | 58 | ->useAttributeAsKey('service') |
| 59 | 59 | ->defaultValue([]) |
| 60 | 60 | ->validate() |
| 61 | - ->ifTrue(static function ($v) { |
|
| 62 | - return count(array_filter(array_keys($v), static function (string $doctrineService) : bool { |
|
| 63 | - return strpos($doctrineService, 'Doctrine\Migrations\\') !==0; |
|
| 61 | + ->ifTrue(static function($v) { |
|
| 62 | + return count(array_filter(array_keys($v), static function(string $doctrineService) : bool { |
|
| 63 | + return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0; |
|
| 64 | 64 | })); |
| 65 | 65 | }) |
| 66 | 66 | ->thenInvalid('Valid services for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.') |
@@ -73,9 +73,9 @@ discard block |
||
| 73 | 73 | ->useAttributeAsKey('factory') |
| 74 | 74 | ->defaultValue([]) |
| 75 | 75 | ->validate() |
| 76 | - ->ifTrue(static function ($v) { |
|
| 77 | - return count(array_filter(array_keys($v), static function (string $doctrineService) : bool { |
|
| 78 | - return strpos($doctrineService, 'Doctrine\Migrations\\') !==0; |
|
| 76 | + ->ifTrue(static function($v) { |
|
| 77 | + return count(array_filter(array_keys($v), static function(string $doctrineService) : bool { |
|
| 78 | + return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0; |
|
| 79 | 79 | })); |
| 80 | 80 | }) |
| 81 | 81 | ->thenInvalid('Valid callables for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.') |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | ->defaultValue(false) |
| 131 | 131 | ->info('Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false') |
| 132 | 132 | ->validate() |
| 133 | - ->ifTrue(static function ($v) use ($organizeMigrationModes) { |
|
| 133 | + ->ifTrue(static function($v) use ($organizeMigrationModes) { |
|
| 134 | 134 | if ($v === false) { |
| 135 | 135 | return false; |
| 136 | 136 | } |
@@ -145,8 +145,8 @@ discard block |
||
| 145 | 145 | ->end() |
| 146 | 146 | ->validate() |
| 147 | 147 | ->ifString() |
| 148 | - ->then(static function ($v) { |
|
| 149 | - return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_' . strtoupper($v)); |
|
| 148 | + ->then(static function($v) { |
|
| 149 | + return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_'.strtoupper($v)); |
|
| 150 | 150 | }) |
| 151 | 151 | ->end() |
| 152 | 152 | ->end() |