@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | $connection = $dbHelper->getConnection(); |
| 46 | 46 | |
| 47 | - if (! $connection instanceof PoolingShardConnection) { |
|
| 47 | + if (!$connection instanceof PoolingShardConnection) { |
|
| 48 | 48 | if (count($managerNames) === 0) { |
| 49 | 49 | throw new LogicException(sprintf( |
| 50 | 50 | "Connection '%s' must implement shards configuration.", |
@@ -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 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | if (empty($dir)) { |
| 33 | 33 | $dir = $container->getParameter('doctrine_migrations.dir_name'); |
| 34 | 34 | |
| 35 | - if (! is_dir($dir) && ! @mkdir($dir, 0777, true) && ! is_dir($dir)) { |
|
| 35 | + if (!is_dir($dir) && !@mkdir($dir, 0777, true) && !is_dir($dir)) { |
|
| 36 | 36 | $error = error_get_last(); |
| 37 | 37 | |
| 38 | 38 | throw new ErrorException(sprintf( |
@@ -48,14 +48,14 @@ discard block |
||
| 48 | 48 | $pathPlaceholderArray = ['kernel.root_dir', 'kernel.cache_dir', 'kernel.logs_dir']; |
| 49 | 49 | |
| 50 | 50 | foreach ($pathPlaceholderArray as $pathPlaceholder) { |
| 51 | - if (! $container->hasParameter($pathPlaceholder) || ! preg_match('/\%' . $pathPlaceholder . '\%/', $dir)) { |
|
| 51 | + if (!$container->hasParameter($pathPlaceholder) || !preg_match('/\%'.$pathPlaceholder.'\%/', $dir)) { |
|
| 52 | 52 | continue; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - $dir = str_replace('%' . $pathPlaceholder . '%', $container->getParameter($pathPlaceholder), $dir); |
|
| 55 | + $dir = str_replace('%'.$pathPlaceholder.'%', $container->getParameter($pathPlaceholder), $dir); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - if (! is_dir($dir) && ! @mkdir($dir, 0777, true) && ! is_dir($dir)) { |
|
| 58 | + if (!is_dir($dir) && !@mkdir($dir, 0777, true) && !is_dir($dir)) { |
|
| 59 | 59 | $error = error_get_last(); |
| 60 | 60 | |
| 61 | 61 | throw new ErrorException(sprintf( |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | // For backward compatibility, need use a table from parameters for overwrite the default configuration |
| 80 | - if (! ($configuration instanceof AbstractFileConfiguration) || empty($configuration->getMigrationsTableName())) { |
|
| 80 | + if (!($configuration instanceof AbstractFileConfiguration) || empty($configuration->getMigrationsTableName())) { |
|
| 81 | 81 | $configuration->setMigrationsTableName($container->getParameter('doctrine_migrations.table_name')); |
| 82 | 82 | } |
| 83 | 83 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $configuration->setAllOrNothing($container->getParameter('doctrine_migrations.all_or_nothing')); |
| 97 | 97 | |
| 98 | 98 | // Migrations is not register from configuration loader |
| 99 | - if (! ($configuration instanceof AbstractFileConfiguration)) { |
|
| 99 | + if (!($configuration instanceof AbstractFileConfiguration)) { |
|
| 100 | 100 | $migrationsDirectory = $configuration->getMigrationsDirectory(); |
| 101 | 101 | |
| 102 | 102 | if ($migrationsDirectory !== null) { |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | { |
| 139 | 139 | foreach ($versions as $version) { |
| 140 | 140 | $migration = $version->getMigration(); |
| 141 | - if (! ($migration instanceof ContainerAwareInterface)) { |
|
| 141 | + if (!($migration instanceof ContainerAwareInterface)) { |
|
| 142 | 142 | continue; |
| 143 | 143 | } |
| 144 | 144 | |
@@ -51,13 +51,13 @@ discard block |
||
| 51 | 51 | ->defaultValue([]) |
| 52 | 52 | ->prototype('scalar')->end() |
| 53 | 53 | ->validate() |
| 54 | - ->ifTrue(static function ($v) { |
|
| 54 | + ->ifTrue(static function($v) { |
|
| 55 | 55 | return count($v) === 0; |
| 56 | 56 | }) |
| 57 | 57 | ->thenInvalid('At least one migrations path must be specified.') |
| 58 | 58 | |
| 59 | - ->ifTrue(static function ($v) { |
|
| 60 | - return count($v) > 1; |
|
| 59 | + ->ifTrue(static function($v) { |
|
| 60 | + return count($v) > 1; |
|
| 61 | 61 | }) |
| 62 | 62 | ->thenInvalid('Maximum one migration path can be specified with the 2.x version.') |
| 63 | 63 | ->end() |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | ->scalarNode('version_column_length') |
| 75 | 75 | ->defaultValue(null) |
| 76 | 76 | ->validate() |
| 77 | - ->ifTrue(static function ($v) { |
|
| 78 | - return $v< 1024; |
|
| 77 | + ->ifTrue(static function($v) { |
|
| 78 | + return $v < 1024; |
|
| 79 | 79 | }) |
| 80 | 80 | ->thenInvalid('The minimum length for the version column is 1024.') |
| 81 | 81 | ->end() |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ->scalarNode('organize_migrations')->defaultValue(false) |
| 116 | 116 | ->info('Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false') |
| 117 | 117 | ->validate() |
| 118 | - ->ifTrue(static function ($v) use ($organizeMigrationModes) { |
|
| 118 | + ->ifTrue(static function($v) use ($organizeMigrationModes) { |
|
| 119 | 119 | if ($v === false) { |
| 120 | 120 | return false; |
| 121 | 121 | } |
@@ -130,8 +130,8 @@ discard block |
||
| 130 | 130 | ->end() |
| 131 | 131 | ->validate() |
| 132 | 132 | ->ifString() |
| 133 | - ->then(static function ($v) { |
|
| 134 | - return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_' . strtoupper($v)); |
|
| 133 | + ->then(static function($v) { |
|
| 134 | + return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_'.strtoupper($v)); |
|
| 135 | 135 | }) |
| 136 | 136 | ->end() |
| 137 | 137 | ->end() |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $config = $this->processConfiguration($configuration, $configs); |
| 30 | 30 | |
| 31 | 31 | // 3.x forward compatibility layer |
| 32 | - if (isset($config['migrations_paths']) && count($config['migrations_paths'])>0) { |
|
| 32 | + if (isset($config['migrations_paths']) && count($config['migrations_paths']) > 0) { |
|
| 33 | 33 | $config['namespace'] = key($config['migrations_paths']); |
| 34 | 34 | $config['dir_name'] = current($config['migrations_paths']); |
| 35 | 35 | unset($config['migrations_paths']); |
@@ -53,10 +53,10 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | foreach ($config as $key => $value) { |
| 56 | - $container->setParameter($this->getAlias() . '.' . $key, $value); |
|
| 56 | + $container->setParameter($this->getAlias().'.'.$key, $value); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - $locator = new FileLocator(__DIR__ . '/../Resources/config/'); |
|
| 59 | + $locator = new FileLocator(__DIR__.'/../Resources/config/'); |
|
| 60 | 60 | $loader = new XmlFileLoader($container, $locator); |
| 61 | 61 | |
| 62 | 62 | $loader->load('services.xml'); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function getXsdValidationBasePath() : string |
| 71 | 71 | { |
| 72 | - return __DIR__ . '/../Resources/config/schema'; |
|
| 72 | + return __DIR__.'/../Resources/config/schema'; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | public function getNamespace() : string |