@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | } |
85 | 85 | if (is_array($paths) && count($paths)) { |
86 | 86 | $pexps = array(); |
87 | - foreach($paths as $path) { |
|
87 | + foreach ($paths as $path) { |
|
88 | 88 | /// @todo use a proper db-aware escaping function |
89 | - $pexps[] = $q->expr->like('path', "'" . str_replace(array('_', '%', "'"), array('\_', '\%', "''"), $path).'%' . "'"); |
|
89 | + $pexps[] = $q->expr->like('path', "'" . str_replace(array('_', '%', "'"), array('\_', '\%', "''"), $path) . '%' . "'"); |
|
90 | 90 | } |
91 | 91 | $exps[] = $q->expr->lor($pexps); |
92 | 92 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | public function endMigration(APIMigration $migration, $force = false) |
197 | 197 | { |
198 | 198 | if ($migration->status == APIMigration::STATUS_STARTED) { |
199 | - throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as its status is 'started'..."); |
|
199 | + throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be ended as its status is 'started'..."); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | $this->createTableIfNeeded(); |
@@ -223,13 +223,13 @@ discard block |
||
223 | 223 | if (!is_array($existingMigrationData)) { |
224 | 224 | // commit to release the lock |
225 | 225 | $conn->commit(); |
226 | - throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not found"); |
|
226 | + throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be ended as it is not found"); |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | if (($existingMigrationData['status'] != APIMigration::STATUS_STARTED) && !$force) { |
230 | 230 | // commit to release the lock |
231 | 231 | $conn->commit(); |
232 | - throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not executing"); |
|
232 | + throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be ended as it is not executing"); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | $conn->update( |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | if (!is_array($existingMigrationData)) { |
385 | 385 | // commit immediately, to release the lock and avoid deadlocks |
386 | 386 | $conn->commit(); |
387 | - throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not found"); |
|
387 | + throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be resumed as it is not found"); |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | // migration exists |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | if ($existingMigrationData['status'] != APIMigration::STATUS_SUSPENDED) { |
394 | 394 | // commit to release the lock |
395 | 395 | $conn->commit(); |
396 | - throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not suspended"); |
|
396 | + throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be resumed as it is not suspended"); |
|
397 | 397 | } |
398 | 398 | |
399 | 399 | $migration = new APIMigration( |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | foreach ($schema->toSql($dbPlatform) as $sql) { |
456 | 456 | try { |
457 | 457 | $this->dbHandler->exec($sql); |
458 | - } catch(QueryException $e) { |
|
458 | + } catch (QueryException $e) { |
|
459 | 459 | // work around limitations in both Mysql and Doctrine |
460 | 460 | // @see https://github.com/kaliop-uk/ezmigrationbundle/issues/176 |
461 | 461 | if (strpos($e->getMessage(), '1071 Specified key was too long; max key length is 767 bytes') !== false && |