@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | protected function setConfiguration(array $config) |
| 47 | 47 | { |
| 48 | 48 | foreach ($config as $configurationKey => $configurationValue) { |
| 49 | - if ( ! isset($this->configurationProperties[$configurationKey])) { |
|
| 49 | + if (!isset($this->configurationProperties[$configurationKey])) { |
|
| 50 | 50 | $msg = sprintf('Migrations configuration key "%s" does not exist.', $configurationKey); |
| 51 | 51 | throw MigrationException::configurationNotValid($msg); |
| 52 | 52 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } elseif (strcasecmp($migrationOrganisation, static::VERSIONS_ORGANIZATION_BY_YEAR_AND_MONTH) == 0) { |
| 81 | 81 | $this->setMigrationsAreOrganizedByYearAndMonth(); |
| 82 | 82 | } else { |
| 83 | - $msg = 'Unknown ' . var_export($migrationOrganisation, true) . ' for configuration "organize_migrations".'; |
|
| 83 | + $msg = 'Unknown '.var_export($migrationOrganisation, true).' for configuration "organize_migrations".'; |
|
| 84 | 84 | throw MigrationException::configurationNotValid($msg); |
| 85 | 85 | } |
| 86 | 86 | } |
@@ -97,12 +97,12 @@ discard block |
||
| 97 | 97 | if ($this->loaded) { |
| 98 | 98 | throw MigrationException::configurationFileAlreadyLoaded(); |
| 99 | 99 | } |
| 100 | - if (file_exists($path = getcwd() . '/' . $file)) { |
|
| 100 | + if (file_exists($path = getcwd().'/'.$file)) { |
|
| 101 | 101 | $file = $path; |
| 102 | 102 | } |
| 103 | 103 | $this->file = $file; |
| 104 | 104 | |
| 105 | - if ( ! file_exists($file)) { |
|
| 105 | + if (!file_exists($file)) { |
|
| 106 | 106 | throw new \InvalidArgumentException('Given config file does not exist'); |
| 107 | 107 | } |
| 108 | 108 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | protected function getDirectoryRelativeToFile($file, $input) |
| 114 | 114 | { |
| 115 | - $path = realpath(dirname($file) . '/' . $input); |
|
| 115 | + $path = realpath(dirname($file).'/'.$input); |
|
| 116 | 116 | |
| 117 | 117 | return ($path !== false) ? $path : $input; |
| 118 | 118 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | { |
| 76 | 76 | $this->configuration = $this->getMigrationConfiguration($input, $output); |
| 77 | 77 | |
| 78 | - if ( ! $input->getOption('add') && ! $input->getOption('delete')) { |
|
| 78 | + if (!$input->getOption('add') && !$input->getOption('delete')) { |
|
| 79 | 79 | throw new \InvalidArgumentException('You must specify whether you want to --add or --delete the specified version.'); |
| 80 | 80 | } |
| 81 | 81 | |
@@ -131,26 +131,26 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | private function mark($version, $all = false) |
| 133 | 133 | { |
| 134 | - if ( ! $this->configuration->hasVersion($version)) { |
|
| 134 | + if (!$this->configuration->hasVersion($version)) { |
|
| 135 | 135 | throw MigrationException::unknownMigrationVersion($version); |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | $version = $this->configuration->getVersion($version); |
| 139 | 139 | if ($this->markMigrated && $this->configuration->hasVersionMigrated($version)) { |
| 140 | - if ( ! $all) { |
|
| 140 | + if (!$all) { |
|
| 141 | 141 | throw new \InvalidArgumentException(sprintf('The version "%s" already exists in the version table.', $version)); |
| 142 | 142 | } |
| 143 | 143 | $marked = true; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - if ( ! $this->markMigrated && ! $this->configuration->hasVersionMigrated($version)) { |
|
| 147 | - if ( ! $all) { |
|
| 146 | + if (!$this->markMigrated && !$this->configuration->hasVersionMigrated($version)) { |
|
| 147 | + if (!$all) { |
|
| 148 | 148 | throw new \InvalidArgumentException(sprintf('The version "%s" does not exist in the version table.', $version)); |
| 149 | 149 | } |
| 150 | 150 | $marked = false; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - if ( ! isset($marked)) { |
|
| 153 | + if (!isset($marked)) { |
|
| 154 | 154 | if ($this->markMigrated) { |
| 155 | 155 | $version->markMigrated(); |
| 156 | 156 | } else { |