@@ -19,7 +19,6 @@ |
||
| 19 | 19 | use Netresearch\Kite\Exception; |
| 20 | 20 | use Netresearch\Kite\Service\Config; |
| 21 | 21 | use Netresearch\Kite\Console\Command\JobCommand; |
| 22 | -use Netresearch\Kite\Service\Factory; |
|
| 23 | 22 | use Symfony\Component\Console\Command\Command; |
| 24 | 23 | use Symfony\Component\Console\Input\InputInterface; |
| 25 | 24 | use Symfony\Component\Console\Input\InputOption; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | list($dir, $file) = $dirAndFile; |
| 82 | 82 | if (is_dir($dir)) { |
| 83 | 83 | $app = $appName; |
| 84 | - $expectedFile = $dir . '/' . $file; |
|
| 84 | + $expectedFile = $dir.'/'.$file; |
|
| 85 | 85 | break; |
| 86 | 86 | } |
| 87 | 87 | } |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | } catch (\Exception $e) { |
| 92 | 92 | if ($app) { |
| 93 | 93 | $message = [ |
| 94 | - 'You appear to be in a ' . $app . ' root directory but', |
|
| 94 | + 'You appear to be in a '.$app.' root directory but', |
|
| 95 | 95 | 'there is no kite config file at the expected', |
| 96 | - 'location (' . $expectedFile . ').' |
|
| 96 | + 'location ('.$expectedFile.').' |
|
| 97 | 97 | ]; |
| 98 | 98 | } else { |
| 99 | 99 | $message = [ |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | 'The config file path is expected to be:', |
| 104 | 104 | ]; |
| 105 | 105 | foreach ($indicators as $appName => $dirAndFile) { |
| 106 | - $message[] = ' - "' . implode('/', $dirAndFile) . '" for ' . $appName . ' applications or'; |
|
| 106 | + $message[] = ' - "'.implode('/', $dirAndFile).'" for '.$appName.' applications or'; |
|
| 107 | 107 | } |
| 108 | - $message[] = ' - "' . $expectedFile . '" for any other application'; |
|
| 108 | + $message[] = ' - "'.$expectedFile.'" for any other application'; |
|
| 109 | 109 | } |
| 110 | 110 | $lMax = 0; |
| 111 | 111 | foreach ($message as $line) { |
@@ -113,12 +113,12 @@ discard block |
||
| 113 | 113 | $lMax = $l; |
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | - $this->output->writeln('<warning>' . str_repeat(' ', $lMax + 4) . '</warning>'); |
|
| 116 | + $this->output->writeln('<warning>'.str_repeat(' ', $lMax + 4).'</warning>'); |
|
| 117 | 117 | foreach ($message as $line) { |
| 118 | 118 | $line = str_pad($line, $lMax + 2); |
| 119 | 119 | $this->output->writeln("<warning> $line</warning>"); |
| 120 | 120 | } |
| 121 | - $this->output->writeln('<warning>' . str_repeat(' ', $lMax + 4) . '</warning>'); |
|
| 121 | + $this->output->writeln('<warning>'.str_repeat(' ', $lMax + 4).'</warning>'); |
|
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | . "| ' /| | __/ _ \\\n" |
| 136 | 136 | . "| . \\| | |_| __/\n" |
| 137 | 137 | . "|_|\\_|_|\\__\\___|\n\n" |
| 138 | - . $this->getLongVersion() . "\n\n" |
|
| 138 | + . $this->getLongVersion()."\n\n" |
|
| 139 | 139 | . $this->getSelfPackage()->description; |
| 140 | 140 | |
| 141 | 141 | return $help; |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | if (isset($package->source)) { |
| 154 | 154 | $v .= " <comment>({$package->source->reference})</comment>"; |
| 155 | 155 | } |
| 156 | - $v .= ' ' . $package->time; |
|
| 156 | + $v .= ' '.$package->time; |
|
| 157 | 157 | return $v; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | { |
| 167 | 167 | static $package = null; |
| 168 | 168 | if (!$package) { |
| 169 | - $files = [__DIR__ . '/../../../../composer/installed.json', __DIR__ . '/vendor/composer/installed.json']; |
|
| 169 | + $files = [__DIR__.'/../../../../composer/installed.json', __DIR__.'/vendor/composer/installed.json']; |
|
| 170 | 170 | foreach ($files as $file) { |
| 171 | 171 | if (file_exists($file)) { |
| 172 | 172 | $installed = json_decode(file_get_contents($file)); |
@@ -183,9 +183,9 @@ discard block |
||
| 183 | 183 | $process = new Process('git symbolic-ref -q --short HEAD || git describe --tags --exact-match; git rev-parse HEAD; git show -s --format=%ct HEAD', $kitePath); |
| 184 | 184 | $process->run(); |
| 185 | 185 | if ($output = $process->getOutput()) { |
| 186 | - $package = json_decode(file_get_contents($kitePath . '/composer.json')); |
|
| 186 | + $package = json_decode(file_get_contents($kitePath.'/composer.json')); |
|
| 187 | 187 | list($name, $revision, $tstamp) = explode("\n", trim($output), 3); |
| 188 | - $package->version = preg_match('/^v?[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?$/i', $name) ? $name : 'dev-' . $name; |
|
| 188 | + $package->version = preg_match('/^v?[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?$/i', $name) ? $name : 'dev-'.$name; |
|
| 189 | 189 | $package->source = (object) ['reference' => $revision]; |
| 190 | 190 | $package->time = date('Y-m-d H:i:s', $tstamp); |
| 191 | 191 | } else { |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $definition->addOption(new InputOption('workflow', null, InputOption::VALUE_OPTIONAL, 'Run a workflow on the fly')); |
| 208 | 208 | |
| 209 | 209 | if (isset($_SERVER['HOME']) && is_writable($_SERVER['HOME'])) { |
| 210 | - $debugDir = $_SERVER['HOME'] . '/.kite/log'; |
|
| 210 | + $debugDir = $_SERVER['HOME'].'/.kite/log'; |
|
| 211 | 211 | } else { |
| 212 | 212 | $debugDir = false; |
| 213 | 213 | } |
@@ -251,19 +251,19 @@ discard block |
||
| 251 | 251 | $strInput .= ' --help'; |
| 252 | 252 | } |
| 253 | 253 | $workflow = $input->getParameterOption('--workflow'); |
| 254 | - $jobName = 'generic:workflow:' . $workflow; |
|
| 254 | + $jobName = 'generic:workflow:'.$workflow; |
|
| 255 | 255 | $this->config->configureJob($jobName, array('workflow' => $workflow)); |
| 256 | 256 | $command = new JobCommand($jobName, $this->config); |
| 257 | 257 | $this->add($command); |
| 258 | 258 | |
| 259 | - $parameterOption = '--workflow=' . $workflow; |
|
| 259 | + $parameterOption = '--workflow='.$workflow; |
|
| 260 | 260 | $input = new StringInput( |
| 261 | 261 | rtrim( |
| 262 | - $jobName . ' ' . |
|
| 262 | + $jobName.' '. |
|
| 263 | 263 | str_replace( |
| 264 | 264 | array( |
| 265 | - $parameterOption . ' ', |
|
| 266 | - ' ' . $parameterOption, |
|
| 265 | + $parameterOption.' ', |
|
| 266 | + ' '.$parameterOption, |
|
| 267 | 267 | $parameterOption |
| 268 | 268 | ), '', $strInput |
| 269 | 269 | ) |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | /** |
| 29 | 29 | * ConsoleOutput constructor. |
| 30 | 30 | * |
| 31 | - * @param int|mixed $verbosity The verbosity |
|
| 31 | + * @param integer $verbosity The verbosity |
|
| 32 | 32 | * @param boolean $decorated If output should be decorated |
| 33 | 33 | * @param OutputFormatterInterface|null $formatter Formatter |
| 34 | 34 | */ |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | namespace Netresearch\Kite\Service; |
| 16 | 16 | |
| 17 | 17 | use Netresearch\Kite\Console\Output\Output; |
| 18 | - |
|
| 19 | 18 | use Symfony\Component\Console\Application; |
| 20 | 19 | use Symfony\Component\Console\Helper; |
| 21 | 20 | use Symfony\Component\Console\Input\InputInterface; |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | * @param callable|null $callback A PHP callback to run whenever there is some |
| 136 | 136 | * output available on STDOUT or STDERR |
| 137 | 137 | * |
| 138 | - * @return mixed The output of the shell command or FALSE if the command returned a non-zero exit code and $ignoreErrors was enabled. |
|
| 138 | + * @return null|string The output of the shell command or FALSE if the command returned a non-zero exit code and $ignoreErrors was enabled. |
|
| 139 | 139 | */ |
| 140 | 140 | public function run($callback = NULL) |
| 141 | 141 | { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | } elseif (is_array($command)) { |
| 67 | 67 | $command = implode('; ', $command); |
| 68 | 68 | } else { |
| 69 | - throw new \Netresearch\Kite\Exception('Command must be string or array, ' . gettype($command) . ' given.', 1312454906); |
|
| 69 | + throw new \Netresearch\Kite\Exception('Command must be string or array, '.gettype($command).' given.', 1312454906); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | parent::__construct($command, $cwd, null, null, null); |
@@ -141,14 +141,14 @@ discard block |
||
| 141 | 141 | { |
| 142 | 142 | $command = $this->getCommandLine(); |
| 143 | 143 | |
| 144 | - $this->console->output('<cmd>' . $this->getWorkingDirectory() . ' > ' . $command . '</cmd>', OutputInterface::VERBOSITY_VERBOSE); |
|
| 144 | + $this->console->output('<cmd>'.$this->getWorkingDirectory().' > '.$command.'</cmd>', OutputInterface::VERBOSITY_VERBOSE); |
|
| 145 | 145 | |
| 146 | 146 | if ($this->dryRun) { |
| 147 | 147 | return null; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | parent::run( |
| 151 | - function ($type, $buffer) use ($callback) { |
|
| 151 | + function($type, $buffer) use ($callback) { |
|
| 152 | 152 | if ($callback) { |
| 153 | 153 | call_user_func($callback, $type, $buffer); |
| 154 | 154 | } |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | * |
| 138 | 138 | * @return mixed The output of the shell command or FALSE if the command returned a non-zero exit code and $ignoreErrors was enabled. |
| 139 | 139 | */ |
| 140 | - public function run($callback = NULL) |
|
| 140 | + public function run($callback = null) |
|
| 141 | 141 | { |
| 142 | 142 | $command = $this->getCommandLine(); |
| 143 | 143 | |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | namespace Netresearch\Kite\Task; |
| 16 | 16 | |
| 17 | 17 | |
| 18 | -use Netresearch\Kite\Exception; |
|
| 19 | 18 | use Netresearch\Kite\Task; |
| 20 | 19 | |
| 21 | 20 | /** |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | /** |
| 137 | 137 | * Execute the command |
| 138 | 138 | * |
| 139 | - * @return mixed |
|
| 139 | + * @return null|string |
|
| 140 | 140 | */ |
| 141 | 141 | protected function executeCommand() |
| 142 | 142 | { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | $process = $this->console->createProcess($this->getCommand(), $this->get('cwd')); |
| 144 | 144 | $process->setDryRun(!$this->shouldExecute()); |
| 145 | 145 | foreach ($this->get('processSettings') as $key => $value) { |
| 146 | - $process->{'set' . ucfirst($key)}($value); |
|
| 146 | + $process->{'set'.ucfirst($key)}($value); |
|
| 147 | 147 | } |
| 148 | 148 | return $process->run(); |
| 149 | 149 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | if ($options || $arguments) { |
| 170 | 170 | throw new Exception('Can not combine argv with options or arguments'); |
| 171 | 171 | } |
| 172 | - $cmd .= ' ' . (is_array($argv) ? implode(' ', $argv) : $argv); |
|
| 172 | + $cmd .= ' '.(is_array($argv) ? implode(' ', $argv) : $argv); |
|
| 173 | 173 | } else { |
| 174 | 174 | $cmd .= $this->renderOptions($options); |
| 175 | 175 | $cmd .= $this->renderArguments($arguments); |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | $argumentString = ''; |
| 225 | 225 | foreach ($arguments as $argument) { |
| 226 | 226 | $value = $this->expand($argument); |
| 227 | - $argumentString .= ' ' . escapeshellarg($value); |
|
| 227 | + $argumentString .= ' '.escapeshellarg($value); |
|
| 228 | 228 | } |
| 229 | 229 | return $argumentString; |
| 230 | 230 | } |
@@ -15,8 +15,6 @@ |
||
| 15 | 15 | namespace Netresearch\Kite\Task; |
| 16 | 16 | use Netresearch\Kite\Task; |
| 17 | 17 | use Netresearch\Kite\Tasks; |
| 18 | -use Netresearch\Kite\Workflow; |
|
| 19 | -use Netresearch\Kite\Exception; |
|
| 20 | 18 | |
| 21 | 19 | /** |
| 22 | 20 | * Run tasks or a workflow within a task |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | /** |
| 427 | 427 | * Execute the next fetched task after given $task |
| 428 | 428 | * |
| 429 | - * @param Task|string $task Task or task name |
|
| 429 | + * @param string $task Task or task name |
|
| 430 | 430 | * |
| 431 | 431 | * @return $this |
| 432 | 432 | */ |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | * @param string $question The question |
| 445 | 445 | * @param string $default The default value |
| 446 | 446 | * |
| 447 | - * @return mixed|\Netresearch\Kite\Task |
|
| 447 | + * @return string |
|
| 448 | 448 | */ |
| 449 | 449 | public function answer($question, $default = null) |
| 450 | 450 | { |
@@ -506,11 +506,11 @@ discard block |
||
| 506 | 506 | * Run a composer command |
| 507 | 507 | * |
| 508 | 508 | * @param string $command The command to execute |
| 509 | - * @param array|string|null $optArg Options and arguments |
|
| 509 | + * @param string $optArg Options and arguments |
|
| 510 | 510 | * {@see \Netresearch\Kite\Task\ShellTask} |
| 511 | 511 | * @param array $processSettings Settings for symfony process class |
| 512 | 512 | * |
| 513 | - * @return string|\Netresearch\Kite\Task\ComposerTask |
|
| 513 | + * @return string |
|
| 514 | 514 | */ |
| 515 | 515 | public function composer($command, $optArg = null, array $processSettings = array()) |
| 516 | 516 | { |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | * {@see \Netresearch\Kite\Task\ShellTask} |
| 567 | 567 | * @param array $processSettings Settings for symfony process class |
| 568 | 568 | * |
| 569 | - * @return Task\GitTask|string |
|
| 569 | + * @return string |
|
| 570 | 570 | */ |
| 571 | 571 | public function git($command, $cwd = null, $optArg = null, array $processSettings = array()) |
| 572 | 572 | { |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | /** |
| 577 | 577 | * Run a workflow for each of the $array's values. |
| 578 | 578 | * |
| 579 | - * @param array|\Traversable $array The object to iterate over |
|
| 579 | + * @param string $array The object to iterate over |
|
| 580 | 580 | * @param string|array $as Either string for |
| 581 | 581 | * foreach ($array as $as) |
| 582 | 582 | * or array for |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | * {@see \Netresearch\Kite\Task\ShellTask} |
| 634 | 634 | * @param array $processSettings Settings for symfony process class |
| 635 | 635 | * |
| 636 | - * @return Task\RemoteShellTask|string |
|
| 636 | + * @return string |
|
| 637 | 637 | */ |
| 638 | 638 | public function remoteShell($command, $cwd = null, $optArg = null, array $processSettings = array()) |
| 639 | 639 | { |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | if (!$name) { |
| 284 | 284 | return 0; |
| 285 | 285 | } |
| 286 | - $key = $type . ':' . $name; |
|
| 286 | + $key = $type.':'.$name; |
|
| 287 | 287 | $tasksAdded = 0; |
| 288 | 288 | if (array_key_exists($key, $this->job->deferredTasks)) { |
| 289 | 289 | while ($task = array_shift($this->job->deferredTasks[$key])) { |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | $shouldRun = $if; |
| 311 | 311 | } elseif (is_string($if)) { |
| 312 | 312 | $shouldRun = (boolean) $task->expand( |
| 313 | - '{' . $if . ' ? 1 : 0}' |
|
| 313 | + '{'.$if.' ? 1 : 0}' |
|
| 314 | 314 | ); |
| 315 | 315 | } else { |
| 316 | 316 | $shouldRun = call_user_func_array($if, array($task, $this->console)); |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | if ($name === '@self') { |
| 350 | 350 | $name = $this->get('name'); |
| 351 | 351 | } |
| 352 | - $key = $type . ':' . $name; |
|
| 352 | + $key = $type.':'.$name; |
|
| 353 | 353 | $this->job->deferredTasks[$key][] = $task; |
| 354 | 354 | } |
| 355 | 355 | } |
@@ -12,8 +12,6 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | namespace Netresearch\Kite\Workflow\Composer; |
| 15 | -use Netresearch\Kite\Exception; |
|
| 16 | - |
|
| 17 | 15 | use Netresearch\Kite\Workflow; |
| 18 | 16 | |
| 19 | 17 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | if (substr($method, 0, 5) === 'check' && $method[5] === strtoupper($method[5])) { |
| 59 | 59 | $check = substr($method, 5); |
| 60 | 60 | $this->checks[] = $check; |
| 61 | - if (method_exists($this, 'fix' . $check)) { |
|
| 61 | + if (method_exists($this, 'fix'.$check)) { |
|
| 62 | 62 | $this->fixes[] = $check; |
| 63 | 63 | } |
| 64 | 64 | } |
@@ -68,12 +68,12 @@ discard block |
||
| 68 | 68 | 'check' => array( |
| 69 | 69 | 'type' => 'array', |
| 70 | 70 | 'option' => true, |
| 71 | - 'label' => 'Only execute these checks - available checks are ' . implode(', ', $this->checks), |
|
| 71 | + 'label' => 'Only execute these checks - available checks are '.implode(', ', $this->checks), |
|
| 72 | 72 | ), |
| 73 | 73 | 'fix' => array( |
| 74 | 74 | 'type' => 'boolean|array', |
| 75 | 75 | 'option' => true, |
| 76 | - 'label' => 'Enable fixes and optionally reduce to certain fixes - available fixes are ' . implode(', ', $this->fixes), |
|
| 76 | + 'label' => 'Enable fixes and optionally reduce to certain fixes - available fixes are '.implode(', ', $this->fixes), |
|
| 77 | 77 | ), |
| 78 | 78 | ) + parent::configureVariables(); |
| 79 | 79 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | public function assemble() |
| 87 | 87 | { |
| 88 | 88 | $this->callback( |
| 89 | - function () { |
|
| 89 | + function() { |
|
| 90 | 90 | $fix = $this->get('fix'); |
| 91 | 91 | $fixes = ($fix === true) ? $this->fixes : (array) $fix; |
| 92 | 92 | $checks = $this->get('check') ?: $this->checks; |
@@ -120,11 +120,11 @@ discard block |
||
| 120 | 120 | if ($packageNames && !in_array($package->name, $packageNames, true)) { |
| 121 | 121 | continue; |
| 122 | 122 | } |
| 123 | - if (is_string($message = $this->{'check' . $check}($package))) { |
|
| 123 | + if (is_string($message = $this->{'check'.$check}($package))) { |
|
| 124 | 124 | if (!$packageNames && !$errors) { |
| 125 | 125 | $this->console->output( |
| 126 | 126 | str_repeat(chr(8), strlen($check)) |
| 127 | - . '<fg=red;bg=black>' . $check . '</>' |
|
| 127 | + . '<fg=red;bg=black>'.$check.'</>' |
|
| 128 | 128 | ); |
| 129 | 129 | } |
| 130 | 130 | $message = sprintf($message, "package <comment>$package->name</>"); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | if ($fix) { |
| 134 | 134 | $this->dontCheckCurrentPackageAgain = false; |
| 135 | 135 | $this->console->indent(); |
| 136 | - $this->{'fix' . $check}($package); |
|
| 136 | + $this->{'fix'.$check}($package); |
|
| 137 | 137 | $this->console->outdent(); |
| 138 | 138 | if (!$this->dontCheckCurrentPackageAgain) { |
| 139 | 139 | $rerunForPackages[] = $package->name; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | if (!$errors) { |
| 156 | 156 | $this->console->output( |
| 157 | 157 | str_repeat(chr(8), strlen($check)) |
| 158 | - . '<fg=green;bg=black>' . $check . '</>' |
|
| 158 | + . '<fg=green;bg=black>'.$check.'</>' |
|
| 159 | 159 | ); |
| 160 | 160 | } |
| 161 | 161 | $this->console->outdent(); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $this->git('reset', $package->path); |
| 213 | 213 | $args = 'save -u'; |
| 214 | 214 | if ($message = $this->answer('Message for stash:')) { |
| 215 | - $args .= ' ' . escapeshellarg($message); |
|
| 215 | + $args .= ' '.escapeshellarg($message); |
|
| 216 | 216 | } |
| 217 | 217 | $this->git('stash', $package->path, $args); |
| 218 | 218 | break; |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | case 2: |
| 284 | 284 | foreach ($commands as $command) { |
| 285 | 285 | $pck = "<comment>{$package->name}</comment>"; |
| 286 | - $this->console->output($msg = ucfirst($command) . "ing $pck...", false); |
|
| 286 | + $this->console->output($msg = ucfirst($command)."ing $pck...", false); |
|
| 287 | 287 | $this->git($command, $package->path, isset($options) ? $options : null); |
| 288 | 288 | $this->console->output( |
| 289 | 289 | str_repeat(chr(8), strlen(strip_tags($msg))) |
@@ -330,8 +330,8 @@ discard block |
||
| 330 | 330 | } |
| 331 | 331 | if ($package->requiredBranch && $package->requiredBranch !== $requiredBranch) { |
| 332 | 332 | $package->invalidRequirements = true; |
| 333 | - return '<error>' . array_pop($dependentPackages) |
|
| 334 | - . ' and ' . array_pop($dependentPackages) |
|
| 333 | + return '<error>'.array_pop($dependentPackages) |
|
| 334 | + . ' and '.array_pop($dependentPackages) |
|
| 335 | 335 | . ' require %s in different branches</error>'; |
| 336 | 336 | } |
| 337 | 337 | $package->requiredBranch = $requiredBranch; |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | } |
| 344 | 344 | } |
| 345 | 345 | } |
| 346 | - $constraint = $package->tag ?: 'dev-' . $package->branch; |
|
| 346 | + $constraint = $package->tag ?: 'dev-'.$package->branch; |
|
| 347 | 347 | if ($package->requiredBranch && $package->requiredBranch !== $package->branch) { |
| 348 | 348 | return "%s is at <comment>$constraint</comment> but is required at <comment>dev-{$package->requiredBranch}</comment>"; |
| 349 | 349 | } |
@@ -367,8 +367,8 @@ discard block |
||
| 367 | 367 | if ($package->invalidRequirements) { |
| 368 | 368 | $this->doExit('Can not fix that', 1); |
| 369 | 369 | } |
| 370 | - $currentConstraint = $package->tag ?: 'dev-' . $package->branch; |
|
| 371 | - $requiredConstraint = 'dev-' . $package->requiredBranch; |
|
| 370 | + $currentConstraint = $package->tag ?: 'dev-'.$package->branch; |
|
| 371 | + $requiredConstraint = 'dev-'.$package->requiredBranch; |
|
| 372 | 372 | if ($package->requiredBranch) { |
| 373 | 373 | $actions = array( |
| 374 | 374 | 1 => "Show divergent commits between <comment>$currentConstraint</comment> and <comment>$requiredConstraint</comment> (and ask again)", |
@@ -424,9 +424,9 @@ discard block |
||
| 424 | 424 | if ($counts[0] || $counts[1]) { |
| 425 | 425 | $num = $counts[0] ?: $counts[1]; |
| 426 | 426 | $type = $counts[0] ? 'behind</>' : 'ahead</> of'; |
| 427 | - return '%s is <comment>' . $num . ' commit' . ($num > 1 ? 's ' : ' ') |
|
| 428 | - . $type . ' locked commit <comment>' |
|
| 429 | - . substr($package->source->reference, 0, 7) . '</>'; |
|
| 427 | + return '%s is <comment>'.$num.' commit'.($num > 1 ? 's ' : ' ') |
|
| 428 | + . $type.' locked commit <comment>' |
|
| 429 | + . substr($package->source->reference, 0, 7).'</>'; |
|
| 430 | 430 | } |
| 431 | 431 | } |
| 432 | 432 | return null; |
@@ -544,12 +544,12 @@ discard block |
||
| 544 | 544 | $side = $i ? 'left' : 'right'; |
| 545 | 545 | $otherSide = $i ? 'right' : 'left'; |
| 546 | 546 | $args = "--$side-only --cherry-pick --pretty=format:'%C(yellow)%h %Cgreen%cd %an%Creset%n %s' --abbrev-commit --date=local "; |
| 547 | - $args .= $ref . '...'; |
|
| 547 | + $args .= $ref.'...'; |
|
| 548 | 548 | $log = $this->git('log', $package->path, $args, array('shy' => true)); |
| 549 | 549 | if ($log) { |
| 550 | 550 | $this->console->output(''); |
| 551 | 551 | |
| 552 | - $title = "<info>{${$side . 'Title'}}</info> > <info>{${$otherSide . 'Title'}}</info>"; |
|
| 552 | + $title = "<info>{${$side.'Title'}}</info> > <info>{${$otherSide.'Title'}}</info>"; |
|
| 553 | 553 | $this->output($title); |
| 554 | 554 | $this->console->output(str_repeat('-', strlen(strip_tags($title)))); |
| 555 | 555 | |