@@ -95,7 +95,7 @@ |
||
| 95 | 95 | |
| 96 | 96 | $output->writeln('<info>Migration: ' . $migration->name . '</info>'); |
| 97 | 97 | $output->writeln('Status: ' . $status); |
| 98 | - $output->writeln('Executed on: <info>' . ($migration->executionDate != null ? date("Y-m-d H:i:s", $migration->executionDate) : '--'). '</info>'); |
|
| 98 | + $output->writeln('Executed on: <info>' . ($migration->executionDate != null ? date("Y-m-d H:i:s", $migration->executionDate) : '--') . '</info>'); |
|
| 99 | 99 | $output->writeln('Execution notes: <info>' . $migration->executionError . '</info>'); |
| 100 | 100 | |
| 101 | 101 | if ($migration->status == Migration::STATUS_SUSPENDED) { |
@@ -58,26 +58,26 @@ |
||
| 58 | 58 | { |
| 59 | 59 | $format = array(); |
| 60 | 60 | if (0 != $dateInterval->y) { |
| 61 | - $format[] = $dateInterval->y.' years'; |
|
| 61 | + $format[] = $dateInterval->y . ' years'; |
|
| 62 | 62 | } |
| 63 | 63 | if (0 != $dateInterval->m) { |
| 64 | - $format[] = $dateInterval->m.' months'; |
|
| 64 | + $format[] = $dateInterval->m . ' months'; |
|
| 65 | 65 | } |
| 66 | 66 | if (0 != $dateInterval->d) { |
| 67 | - $format[] = $dateInterval->d.' days'; |
|
| 67 | + $format[] = $dateInterval->d . ' days'; |
|
| 68 | 68 | } |
| 69 | 69 | //if (0 < $dateInterval->h || 0 < $dateInterval->i || 0 < $dateInterval->s) { |
| 70 | 70 | // $format .= 'T'; |
| 71 | 71 | //} |
| 72 | 72 | if (0 != $dateInterval->h) { |
| 73 | - $format[] = $dateInterval->h.' hours'; |
|
| 73 | + $format[] = $dateInterval->h . ' hours'; |
|
| 74 | 74 | } |
| 75 | 75 | if (0 != $dateInterval->i) { |
| 76 | - $format[] = $dateInterval->i.' minutes'; |
|
| 76 | + $format[] = $dateInterval->i . ' minutes'; |
|
| 77 | 77 | } |
| 78 | 78 | if (0 != $dateInterval->s) { |
| 79 | - $format[] = $dateInterval->s.' seconds'; |
|
| 79 | + $format[] = $dateInterval->s . ' seconds'; |
|
| 80 | 80 | } |
| 81 | - return implode( ', ', $format); |
|
| 81 | + return implode(', ', $format); |
|
| 82 | 82 | } |
| 83 | 83 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $currentProcesses = array_splice($processesQueue, 0, $maxParallel); |
| 29 | 29 | // start the initial stack of processes |
| 30 | 30 | foreach ($currentProcesses as $process) { |
| 31 | - $process->start(function ($type, $buffer) use ($callback, $process) { |
|
| 31 | + $process->start(function($type, $buffer) use ($callback, $process) { |
|
| 32 | 32 | if ($callback) { |
| 33 | 33 | $callback($type, $buffer, $process); |
| 34 | 34 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | // directly add and start new process after the previous finished |
| 45 | 45 | if (count($processesQueue) > 0) { |
| 46 | 46 | $nextProcess = array_shift($processesQueue); |
| 47 | - $nextProcess->start(function ($type, $buffer) use ($callback, $nextProcess) { |
|
| 47 | + $nextProcess->start(function($type, $buffer) use ($callback, $nextProcess) { |
|
| 48 | 48 | if ($callback) { |
| 49 | 49 | $callback($type, $buffer, $nextProcess); |
| 50 | 50 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | public function hasEmbeddedReferences($string) |
| 19 | 19 | { |
| 20 | 20 | $regexp = $this->getEmbeddedRegexp(); |
| 21 | - return (bool) preg_match_all($regexp, $string, $matches); |
|
| 21 | + return (bool)preg_match_all($regexp, $string, $matches); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | // we need to alter the regexp we usr for std ref resolving, as it will be used to match parts of text, not the whole string |
| 54 | 54 | $regexp = substr($this->getRegexp(), 1, -1); |
| 55 | - return '/' . preg_quote($this->beginToken). preg_replace(array('/^\^/'), array(''), $regexp) . '[^' . $this->endToken . ']+' . preg_quote($this->endToken) . '/'; |
|
| 55 | + return '/' . preg_quote($this->beginToken) . preg_replace(array('/^\^/'), array(''), $regexp) . '[^' . $this->endToken . ']+' . preg_quote($this->endToken) . '/'; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function getReferenceValue($identifier) |
| 37 | 37 | { |
| 38 | - switch(substr($identifier, 5)) { |
|
| 38 | + switch (substr($identifier, 5)) { |
|
| 39 | 39 | case 'iteration': |
| 40 | 40 | $current = end($this->stack); |
| 41 | 41 | return $current['step']; |
@@ -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,23 +22,23 @@ |
||
| 22 | 22 | public function getProcess() |
| 23 | 23 | { |
| 24 | 24 | $parentClass = get_parent_class($this); |
| 25 | - $this_prefix = \Closure::bind(function(ProcessBuilder $builder){return $builder->prefix;}, null, $parentClass); |
|
| 25 | + $this_prefix = \Closure::bind(function(ProcessBuilder $builder) {return $builder->prefix; }, null, $parentClass); |
|
| 26 | 26 | $this_prefix = $this_prefix($this); |
| 27 | - $this_arguments = \Closure::bind(function(ProcessBuilder $builder){return $builder->arguments;}, null, $parentClass); |
|
| 27 | + $this_arguments = \Closure::bind(function(ProcessBuilder $builder) {return $builder->arguments; }, null, $parentClass); |
|
| 28 | 28 | $this_arguments = $this_arguments($this); |
| 29 | - $this_options = \Closure::bind(function(ProcessBuilder $builder){return $builder->options;}, null, $parentClass); |
|
| 29 | + $this_options = \Closure::bind(function(ProcessBuilder $builder) {return $builder->options; }, null, $parentClass); |
|
| 30 | 30 | $this_options = $this_options($this); |
| 31 | - $this_inheritEnv = \Closure::bind(function(ProcessBuilder $builder){return $builder->inheritEnv;}, null, $parentClass); |
|
| 31 | + $this_inheritEnv = \Closure::bind(function(ProcessBuilder $builder) {return $builder->inheritEnv; }, null, $parentClass); |
|
| 32 | 32 | $this_inheritEnv = $this_inheritEnv($this); |
| 33 | - $this_env = \Closure::bind(function(ProcessBuilder $builder){return $builder->env;}, null, $parentClass); |
|
| 33 | + $this_env = \Closure::bind(function(ProcessBuilder $builder) {return $builder->env; }, null, $parentClass); |
|
| 34 | 34 | $this_env = $this_env($this); |
| 35 | - $this_cwd = \Closure::bind(function(ProcessBuilder $builder){return $builder->cwd;}, null, $parentClass); |
|
| 35 | + $this_cwd = \Closure::bind(function(ProcessBuilder $builder) {return $builder->cwd; }, null, $parentClass); |
|
| 36 | 36 | $this_cwd = $this_cwd($this); |
| 37 | - $this_input = \Closure::bind(function(ProcessBuilder $builder){return $builder->input;}, null, $parentClass); |
|
| 37 | + $this_input = \Closure::bind(function(ProcessBuilder $builder) {return $builder->input; }, null, $parentClass); |
|
| 38 | 38 | $this_input = $this_input($this); |
| 39 | - $this_timeout = \Closure::bind(function(ProcessBuilder $builder){return $builder->timeout;}, null, $parentClass); |
|
| 39 | + $this_timeout = \Closure::bind(function(ProcessBuilder $builder) {return $builder->timeout; }, null, $parentClass); |
|
| 40 | 40 | $this_timeout = $this_timeout($this); |
| 41 | - $this_outputDisabled = \Closure::bind(function(ProcessBuilder $builder){return $builder->outputDisabled;}, null, $parentClass); |
|
| 41 | + $this_outputDisabled = \Closure::bind(function(ProcessBuilder $builder) {return $builder->outputDisabled; }, null, $parentClass); |
|
| 42 | 42 | $this_outputDisabled = $this_outputDisabled($this); |
| 43 | 43 | |
| 44 | 44 | if (0 === count($this_prefix) && 0 === count($this_arguments)) { |
@@ -156,7 +156,7 @@ |
||
| 156 | 156 | $childTags = $this->findTagsByParentTagIds(array_keys($parentTags)); |
| 157 | 157 | $tags = array_merge($tags, $childTags); |
| 158 | 158 | $parentTags = $childTags; |
| 159 | - } while (count( $childTags ) > 0); |
|
| 159 | + } while (count($childTags) > 0); |
|
| 160 | 160 | |
| 161 | 161 | return $tags; |
| 162 | 162 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | if (is_string($key) && is_string($value)) { |
| 47 | 47 | return array('identifier' => $key, 'attribute' => $value); |
| 48 | 48 | } |
| 49 | - if (!is_array($value) || !isset($value['identifier']) || ! isset($value['attribute'])) { |
|
| 49 | + if (!is_array($value) || !isset($value['identifier']) || !isset($value['attribute'])) { |
|
| 50 | 50 | throw new InvalidStepDefinitionException("Invalid reference definition for reference number $key"); |
| 51 | 51 | } |
| 52 | 52 | return $value; |