| @@ -10,7 +10,6 @@ | ||
| 10 | 10 | use Symfony\Component\HttpKernel\Bundle\BundleInterface; | 
| 11 | 11 | use Symfony\Component\HttpKernel\KernelInterface; | 
| 12 | 12 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | 
| 13 | - | |
| 14 | 13 | use RDV\Bundle\MigrationBundle\Migration\Migration; | 
| 15 | 14 | use RDV\Bundle\MigrationBundle\Migration\MigrationState; | 
| 16 | 15 | use RDV\Bundle\MigrationBundle\Migration\Installation; | 
| @@ -175,7 +175,7 @@ discard block | ||
| 175 | 175 |                  if (!empty($bundleMigrationDirectories)) { | 
| 176 | 176 | uksort( | 
| 177 | 177 | $bundleMigrationDirectories, | 
| 178 | -                        function ($a, $b) { | |
| 178 | +                        function($a, $b) { | |
| 179 | 179 | return version_compare($a, $b); | 
| 180 | 180 | } | 
| 181 | 181 | ); | 
| @@ -335,7 +335,7 @@ discard block | ||
| 335 | 335 |                  if (count($versionedMigrations) > 1) { | 
| 336 | 336 | usort( | 
| 337 | 337 | $groupedMigrations[$bundleName][$version], | 
| 338 | -                        function ($a, $b) { | |
| 338 | +                        function($a, $b) { | |
| 339 | 339 | $aOrder = 0; | 
| 340 | 340 |                              if ($a instanceof OrderedMigrationInterface) { | 
| 341 | 341 | $aOrder = $a->getOrder(); | 
| @@ -104,13 +104,13 @@ | ||
| 104 | 104 | '', | 
| 105 | 105 | array_merge( | 
| 106 | 106 | array_map( | 
| 107 | -                        function ($name) { | |
| 107 | +                        function($name) { | |
| 108 | 108 | return dechex(crc32($name)); | 
| 109 | 109 | }, | 
| 110 | 110 | $tableNames | 
| 111 | 111 | ), | 
| 112 | 112 | array_map( | 
| 113 | -                        function ($name) { | |
| 113 | +                        function($name) { | |
| 114 | 114 | return dechex(crc32($name)); | 
| 115 | 115 | }, | 
| 116 | 116 | $columnNames | 
| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 | $this->orderedFixtures = $this->fixtures; | 
| 62 | 62 | usort( | 
| 63 | 63 | $this->orderedFixtures, | 
| 64 | -            function ($a, $b) { | |
| 64 | +            function($a, $b) { | |
| 65 | 65 |                  if ($a instanceof OrderedFixtureInterface && $b instanceof OrderedFixtureInterface) { | 
| 66 | 66 |                      if ($a->getOrder() === $b->getOrder()) { | 
| 67 | 67 | return 0; | 
| @@ -100,7 +100,7 @@ discard block | ||
| 100 | 100 |          if ($usedPrioritySorting) { | 
| 101 | 101 | $this->orderedFixtures = array_filter( | 
| 102 | 102 | $this->orderedFixtures, | 
| 103 | -                function ($fixture) { | |
| 103 | +                function($fixture) { | |
| 104 | 104 | return $fixture instanceof OrderedFixtureInterface; | 
| 105 | 105 | } | 
| 106 | 106 | ); | 
| @@ -121,7 +121,7 @@ discard block | ||
| 121 | 121 | * @return bool | 
| 122 | 122 | */ | 
| 123 | 123 | public function executeUpMigration( | 
| 124 | - Schema &$schema, | |
| 124 | + Schema & $schema, | |
| 125 | 125 | AbstractPlatform $platform, | 
| 126 | 126 | Migration $migration, | 
| 127 | 127 | $dryRun = false | 
| @@ -308,7 +308,7 @@ discard block | ||
| 308 | 308 | protected function getTableFromDiff(TableDiff $diff) | 
| 309 | 309 |      { | 
| 310 | 310 | $changedColumns = array_map( | 
| 311 | -            function (ColumnDiff $columnDiff) { | |
| 311 | +            function(ColumnDiff $columnDiff) { | |
| 312 | 312 | return $columnDiff->column; | 
| 313 | 313 | }, | 
| 314 | 314 | $diff->changedColumns | 
| @@ -148,7 +148,7 @@ | ||
| 148 | 148 | |
| 149 | 149 |          $executor = new ORMExecutor($this->getContainer()->get('doctrine.orm.entity_manager')); | 
| 150 | 150 | $executor->setLogger( | 
| 151 | -            function ($message) use ($output) { | |
| 151 | +            function($message) use ($output) { | |
| 152 | 152 |                  $output->writeln(sprintf('  <comment>></comment> <info>%s</info>', $message)); | 
| 153 | 153 | } | 
| 154 | 154 | ); | 
| @@ -87,7 +87,7 @@ | ||
| 87 | 87 |                          $input->getOption('show-queries') ? null : OutputInterface::VERBOSITY_QUIET, | 
| 88 | 88 | ' ' | 
| 89 | 89 | ); | 
| 90 | - $executor = $this->getMigrationExecutor(); | |
| 90 | + $executor = $this->getMigrationExecutor(); | |
| 91 | 91 | $executor->setLogger($logger); | 
| 92 | 92 | $executor->getQueryExecutor()->setLogger($queryLogger); | 
| 93 | 93 |                      $executor->executeUp($migrations, $input->getOption('dry-run')); | 
| @@ -112,7 +112,7 @@ | ||
| 112 | 112 | $allMetadata = $doctrine->getManager()->getMetadataFactory()->getAllMetadata(); | 
| 113 | 113 | array_walk( | 
| 114 | 114 | $allMetadata, | 
| 115 | -            function (ClassMetadata $entityMetadata) { | |
| 115 | +            function(ClassMetadata $entityMetadata) { | |
| 116 | 116 |                  if ($this->namespace) { | 
| 117 | 117 |                      if ($entityMetadata->namespace == $this->namespace) { | 
| 118 | 118 | $this->allowedTables[$entityMetadata->getTableName()] = true; | 
| @@ -70,7 +70,7 @@ discard block | ||
| 70 | 70 |              ->method('dispatch') | 
| 71 | 71 | ->will( | 
| 72 | 72 | $this->returnCallback( | 
| 73 | -                    function ($eventName, $event) use (&$installed) { | |
| 73 | +                    function($eventName, $event) use (&$installed) { | |
| 74 | 74 |                          if ($eventName === MigrationEvents::PRE_UP) { | 
| 75 | 75 |                              if (null !== $installed) { | 
| 76 | 76 |                                  foreach ($installed as $val) { | 
| @@ -96,7 +96,7 @@ discard block | ||
| 96 | 96 | protected function getMigrationClasses(array $migrations) | 
| 97 | 97 |      { | 
| 98 | 98 | return array_map( | 
| 99 | -            function ($migration) { | |
| 99 | +            function($migration) { | |
| 100 | 100 | return get_class($migration->getMigration()); | 
| 101 | 101 | }, | 
| 102 | 102 | $migrations | 
| @@ -160,7 +160,7 @@ | ||
| 160 | 160 | [new MySqlPlatform(), 'ALTER TABLE test_table CHANGE old_column new_column VARCHAR(100) NOT NULL'], | 
| 161 | 161 | [new PostgreSqlPlatform(), 'ALTER TABLE test_table RENAME COLUMN old_column TO new_column'], | 
| 162 | 162 | [new OraclePlatform(), 'ALTER TABLE test_table RENAME COLUMN old_column TO new_column'], | 
| 163 | - [new SQLServer2005Platform(), "sp_RENAME 'test_table.old_column', 'new_column', 'COLUMN'",], | |
| 163 | + [new SQLServer2005Platform(), "sp_RENAME 'test_table.old_column', 'new_column', 'COLUMN'", ], | |
| 164 | 164 | ]; | 
| 165 | 165 | } | 
| 166 | 166 | |