@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | // filter away all migrations except 'to do' ones |
| 69 | 69 | $toExecute = array(); |
| 70 | - foreach($migrationDefinitions as $name => $migrationDefinition) { |
|
| 70 | + foreach ($migrationDefinitions as $name => $migrationDefinition) { |
|
| 71 | 71 | if (!isset($migrations[$name]) || (($migration = $migrations[$name]) && $migration->status == Migration::STATUS_TODO)) { |
| 72 | 72 | $toExecute[$name] = $migrationsService->parseMigrationDefinition($migrationDefinition); |
| 73 | 73 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | $data = array(); |
| 102 | 102 | $i = 1; |
| 103 | - foreach($toExecute as $name => $migrationDefinition) { |
|
| 103 | + foreach ($toExecute as $name => $migrationDefinition) { |
|
| 104 | 104 | $notes = ''; |
| 105 | 105 | if ($migrationDefinition->status != MigrationDefinition::STATUS_PARSED) { |
| 106 | 106 | $notes = '<error>' . $migrationDefinition->parsingError . '</error>'; |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $output->writeln("=============================================\n"); |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - foreach($toExecute as $name => $migrationDefinition) { |
|
| 138 | + foreach ($toExecute as $name => $migrationDefinition) { |
|
| 139 | 139 | |
| 140 | 140 | // let's skip migrations that we know are invalid - user was warned and he decided to proceed anyway |
| 141 | 141 | if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) { |
@@ -147,12 +147,12 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | try { |
| 149 | 149 | $migrationsService->executeMigration($migrationDefinition); |
| 150 | - } catch(\Exception $e) { |
|
| 150 | + } catch (\Exception $e) { |
|
| 151 | 151 | if ($input->getOption('ignore-failures')) { |
| 152 | - $output->writeln("\n<error>Migration failed! Reason: ".$this->getFullExceptionMessage($e)."</error>\n"); |
|
| 152 | + $output->writeln("\n<error>Migration failed! Reason: " . $this->getFullExceptionMessage($e) . "</error>\n"); |
|
| 153 | 153 | continue; |
| 154 | 154 | } |
| 155 | - $output->writeln("\n<error>Migration aborted! Reason: ".$this->getFullExceptionMessage($e)."</error>"); |
|
| 155 | + $output->writeln("\n<error>Migration aborted! Reason: " . $this->getFullExceptionMessage($e) . "</error>"); |
|
| 156 | 156 | return 1; |
| 157 | 157 | } |
| 158 | 158 | |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // try to load autoloade both when extension is top-level project and when it is installed as part of a working eZPUblish |
| 4 | -if (!file_exists($file = __DIR__.'/../vendor/autoload.php') && !file_exists($file = __DIR__.'/../../../../vendor/autoload.php')) { |
|
| 4 | +if (!file_exists($file = __DIR__ . '/../vendor/autoload.php') && !file_exists($file = __DIR__ . '/../../../../vendor/autoload.php')) { |
|
| 5 | 5 | throw new \RuntimeException('Install the dependencies to run the test suite.'); |
| 6 | 6 | } |
| 7 | 7 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include_once(__DIR__.'/CommandTest.php'); |
|
| 3 | +include_once(__DIR__ . '/CommandTest.php'); |
|
| 4 | 4 | |
| 5 | 5 | use Symfony\Component\Console\Input\ArrayInput; |
| 6 | 6 | |
@@ -64,6 +64,6 @@ discard block |
||
| 64 | 64 | $exitCode = $this->app->run($input, $this->output); |
| 65 | 65 | $output = $this->output->fetch(); |
| 66 | 66 | $this->assertSame(0, $exitCode); |
| 67 | - $this->assertRegExp('?\| ' . basename($filePath) . ' +\| not executed \|?', $output ); |
|
| 67 | + $this->assertRegExp('?\| ' . basename($filePath) . ' +\| not executed \|?', $output); |
|
| 68 | 68 | } |
| 69 | 69 | } |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | abstract class CommandTest extends WebTestCase |
| 8 | 8 | { |
| 9 | - protected $dslDir = __DIR__.'/../dsl'; |
|
| 9 | + protected $dslDir = __DIR__ . '/../dsl'; |
|
| 10 | 10 | protected $targetBundle = 'EzPublishCoreBundle'; // it is always present :-) |
| 11 | 11 | protected $leftovers = array(); |
| 12 | 12 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | protected function tearDown() |
| 28 | 28 | { |
| 29 | - foreach($this->leftovers as $file) { |
|
| 29 | + foreach ($this->leftovers as $file) { |
|
| 30 | 30 | unlink($file); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include_once(__DIR__.'/CommandTest.php'); |
|
| 3 | +include_once(__DIR__ . '/CommandTest.php'); |
|
| 4 | 4 | |
| 5 | 5 | use Symfony\Component\Console\Input\ArrayInput; |
| 6 | 6 | |
@@ -81,9 +81,9 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | public function goodDSLProvider() |
| 83 | 83 | { |
| 84 | - $dslDir = $this->dslDir.'/good'; |
|
| 84 | + $dslDir = $this->dslDir . '/good'; |
|
| 85 | 85 | $out = array(); |
| 86 | - foreach(scandir($dslDir) as $fileName) { |
|
| 86 | + foreach (scandir($dslDir) as $fileName) { |
|
| 87 | 87 | $filePath = $dslDir . '/' . $fileName; |
| 88 | 88 | if (is_file($filePath)) { |
| 89 | 89 | $out[] = array($filePath); |
@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | public function badDSLProvider() |
| 96 | 96 | { |
| 97 | - $dslDir = $this->dslDir.'/bad'; |
|
| 97 | + $dslDir = $this->dslDir . '/bad'; |
|
| 98 | 98 | $out = array(); |
| 99 | - foreach(scandir($dslDir) as $fileName) { |
|
| 99 | + foreach (scandir($dslDir) as $fileName) { |
|
| 100 | 100 | $filePath = $dslDir . '/' . $fileName; |
| 101 | 101 | if (is_file($filePath)) { |
| 102 | 102 | $out[] = array($filePath); |