@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | public static function forceSigchildEnabled($force) |
| 16 | 16 | { |
| 17 | - self::$forceSigchildEnabled = (bool) $force; |
|
| 17 | + self::$forceSigchildEnabled = (bool)$force; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | protected function isSigchildEnabled() |
@@ -22,17 +22,17 @@ discard block |
||
| 22 | 22 | public function getProcess() |
| 23 | 23 | { |
| 24 | 24 | /** @var array $this_prefix */ |
| 25 | - $this_prefix = \Closure::bind(function(ProcessBuilder $builder){return $builder->prefix;}, null, $this); |
|
| 25 | + $this_prefix = \Closure::bind(function(ProcessBuilder $builder) {return $builder->prefix; }, null, $this); |
|
| 26 | 26 | /** @var array $this_arguments */ |
| 27 | - $this_arguments = \Closure::bind(function(ProcessBuilder $builder){return $builder->arguments;}, null, $this); |
|
| 27 | + $this_arguments = \Closure::bind(function(ProcessBuilder $builder) {return $builder->arguments; }, null, $this); |
|
| 28 | 28 | /** @var array $this_options */ |
| 29 | - $this_options = \Closure::bind(function(ProcessBuilder $builder){return $builder->options;}, null, $this); |
|
| 30 | - $this_inheritEnv = \Closure::bind(function(ProcessBuilder $builder){return $builder->inheritEnv;}, null, $this); |
|
| 31 | - $this_env = \Closure::bind(function(ProcessBuilder $builder){return $builder->env;}, null, $this); |
|
| 32 | - $this_cwd = \Closure::bind(function(ProcessBuilder $builder){return $builder->cwd;}, null, $this); |
|
| 33 | - $this_input = \Closure::bind(function(ProcessBuilder $builder){return $builder->input;}, null, $this); |
|
| 34 | - $this_timeout = \Closure::bind(function(ProcessBuilder $builder){return $builder->timeout;}, null, $this); |
|
| 35 | - $this_outputDisabled = \Closure::bind(function(ProcessBuilder $builder){return $builder->outputDisabled;}, null, $this); |
|
| 29 | + $this_options = \Closure::bind(function(ProcessBuilder $builder) {return $builder->options; }, null, $this); |
|
| 30 | + $this_inheritEnv = \Closure::bind(function(ProcessBuilder $builder) {return $builder->inheritEnv; }, null, $this); |
|
| 31 | + $this_env = \Closure::bind(function(ProcessBuilder $builder) {return $builder->env; }, null, $this); |
|
| 32 | + $this_cwd = \Closure::bind(function(ProcessBuilder $builder) {return $builder->cwd; }, null, $this); |
|
| 33 | + $this_input = \Closure::bind(function(ProcessBuilder $builder) {return $builder->input; }, null, $this); |
|
| 34 | + $this_timeout = \Closure::bind(function(ProcessBuilder $builder) {return $builder->timeout; }, null, $this); |
|
| 35 | + $this_outputDisabled = \Closure::bind(function(ProcessBuilder $builder) {return $builder->outputDisabled; }, null, $this); |
|
| 36 | 36 | |
| 37 | 37 | if (0 === count($this_prefix) && 0 === count($this_arguments)) { |
| 38 | 38 | throw new LogicException('You must add() command arguments before calling getProcess().'); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $options = $this_options; |
| 42 | 42 | |
| 43 | 43 | $arguments = array_merge($this_prefix, $this_arguments); |
| 44 | - $script = implode(' ', array_map(array(__NAMESPACE__.'\\ProcessUtils', 'escapeArgument'), $arguments)); |
|
| 44 | + $script = implode(' ', array_map(array(__NAMESPACE__ . '\\ProcessUtils', 'escapeArgument'), $arguments)); |
|
| 45 | 45 | |
| 46 | 46 | if ($this_inheritEnv) { |
| 47 | 47 | // include $_ENV for BC purposes |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) { |
| 267 | - throw new \Exception("Can not execute " . $this->getEntityName($migrationDefinition). " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}"); |
|
| 267 | + throw new \Exception("Can not execute " . $this->getEntityName($migrationDefinition) . " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}"); |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | /// @todo add support for setting in $migrationContext a userContentType ? |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | |
| 299 | 299 | try { |
| 300 | 300 | |
| 301 | - $i = $stepOffset+1; |
|
| 301 | + $i = $stepOffset + 1; |
|
| 302 | 302 | $finalStatus = Migration::STATUS_DONE; |
| 303 | 303 | $finalMessage = null; |
| 304 | 304 | |
@@ -433,12 +433,12 @@ discard block |
||
| 433 | 433 | public function resumeMigration(Migration $migration, $useTransaction = true) |
| 434 | 434 | { |
| 435 | 435 | if ($migration->status != Migration::STATUS_SUSPENDED) { |
| 436 | - throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': it is not in suspended status"); |
|
| 436 | + throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': it is not in suspended status"); |
|
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | $migrationDefinitions = $this->getMigrationsDefinitions(array($migration->path)); |
| 440 | 440 | if (!count($migrationDefinitions)) { |
| 441 | - throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': its definition is missing"); |
|
| 441 | + throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': its definition is missing"); |
|
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | $defs = $migrationDefinitions->getArrayCopy(); |
@@ -446,18 +446,18 @@ discard block |
||
| 446 | 446 | |
| 447 | 447 | $migrationDefinition = $this->parseMigrationDefinition($migrationDefinition); |
| 448 | 448 | if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) { |
| 449 | - throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': {$migrationDefinition->parsingError}"); |
|
| 449 | + throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': {$migrationDefinition->parsingError}"); |
|
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | // restore context |
| 453 | 453 | $this->contextHandler->restoreCurrentContext($migration->name); |
| 454 | 454 | |
| 455 | 455 | if (!isset($this->migrationContext[$migration->name])) { |
| 456 | - throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is missing"); |
|
| 456 | + throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is missing"); |
|
| 457 | 457 | } |
| 458 | 458 | $restoredContext = $this->migrationContext[$migration->name]; |
| 459 | - if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'] )) { |
|
| 460 | - throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is invalid"); |
|
| 459 | + if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'])) { |
|
| 460 | + throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is invalid"); |
|
| 461 | 461 | } |
| 462 | 462 | |
| 463 | 463 | // update migration status |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | * @param bool|null $forceSigchildEnabled |
| 479 | 479 | * @return array |
| 480 | 480 | */ |
| 481 | - protected function migrationContextFromParameters($defaultLanguageCode = null, $adminLogin = null, $forceSigchildEnabled = null ) |
|
| 481 | + protected function migrationContextFromParameters($defaultLanguageCode = null, $adminLogin = null, $forceSigchildEnabled = null) |
|
| 482 | 482 | { |
| 483 | 483 | $properties = array(); |
| 484 | 484 | |