@@ -59,7 +59,7 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | protected function formatQuestion($question, $default = null) |
| 61 | 61 | { |
| 62 | - return '<question>' . $question . '</question> ' |
|
| 62 | + return '<question>'.$question.'</question> ' |
|
| 63 | 63 | . ($default !== null && $default !== '' ? "[{$default}] " : ''); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -114,12 +114,12 @@ |
||
| 114 | 114 | */ |
| 115 | 115 | protected function getScpCommand() |
| 116 | 116 | { |
| 117 | - $rsyncCommand = 'rsync' . $this->renderOptions($this->options); |
|
| 117 | + $rsyncCommand = 'rsync'.$this->renderOptions($this->options); |
|
| 118 | 118 | |
| 119 | 119 | foreach (array('include', 'exclude') as $type) { |
| 120 | 120 | $rules = $this->getMergedArrayOption($type, $this->defaultRules[$type]); |
| 121 | 121 | foreach ($rules as $rule) { |
| 122 | - $rsyncCommand .= ' --' . $type . '=' . escapeshellarg($rule); |
|
| 122 | + $rsyncCommand .= ' --'.$type.'='.escapeshellarg($rule); |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | |
@@ -76,11 +76,11 @@ |
||
| 76 | 76 | if (is_string($fn)) { |
| 77 | 77 | $name = $fn; |
| 78 | 78 | } elseif (is_array($fn)) { |
| 79 | - $name = (is_object($fn[0]) ? get_class($fn[0]) . '->' : $fn[0] . '::') . $fn[1]; |
|
| 79 | + $name = (is_object($fn[0]) ? get_class($fn[0]).'->' : $fn[0].'::').$fn[1]; |
|
| 80 | 80 | } else { |
| 81 | 81 | $name = 'anonymous function'; |
| 82 | 82 | } |
| 83 | - $this->console->output('Calling ' . $name, OutputInterface::VERBOSITY_DEBUG); |
|
| 83 | + $this->console->output('Calling '.$name, OutputInterface::VERBOSITY_DEBUG); |
|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | ?> |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | public function run() |
| 40 | 40 | { |
| 41 | 41 | if ($this->has('message')) { |
| 42 | - $this->console->output('<info>' . $this->get('message') . '</info>'); |
|
| 42 | + $this->console->output('<info>'.$this->get('message').'</info>'); |
|
| 43 | 43 | } |
| 44 | 44 | throw new BreakException('Execution stopped'); |
| 45 | 45 | } |
@@ -104,13 +104,13 @@ |
||
| 104 | 104 | protected function getSshCommand($command, Node $node, $cwd = null) |
| 105 | 105 | { |
| 106 | 106 | if ($cwd && !preg_match('#^cd\s+[\'"]?/#', $command)) { |
| 107 | - $command = 'cd ' . escapeshellarg($cwd) . '; ' . $command; |
|
| 107 | + $command = 'cd '.escapeshellarg($cwd).'; '.$command; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | $sshCommand |
| 111 | - = rtrim('ssh' . $node->get('sshOptions')) |
|
| 112 | - . ' ' . escapeshellarg($node->get('url')) |
|
| 113 | - . ' ' . escapeshellarg($command); |
|
| 111 | + = rtrim('ssh'.$node->get('sshOptions')) |
|
| 112 | + . ' '.escapeshellarg($node->get('url')) |
|
| 113 | + . ' '.escapeshellarg($command); |
|
| 114 | 114 | |
| 115 | 115 | $this->addExpect($sshCommand, $node); |
| 116 | 116 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | { |
| 70 | 70 | $files = $this->get('files'); |
| 71 | 71 | if (is_string($files)) { |
| 72 | - $files = array_filter(preg_split('#[\n' . PATH_SEPARATOR . ',]#', $files)); |
|
| 72 | + $files = array_filter(preg_split('#[\n'.PATH_SEPARATOR.',]#', $files)); |
|
| 73 | 73 | } |
| 74 | 74 | if (!is_array($files) && !$files instanceof \Traversable) { |
| 75 | 75 | throw new \Netresearch\Kite\Exception('files must be traversable'); |
@@ -88,22 +88,22 @@ discard block |
||
| 88 | 88 | $filesystem = $this->console->getFilesystem(); |
| 89 | 89 | $dir = dirname($this->get('toFile')); |
| 90 | 90 | $filesystem->ensureDirectoryExists($dir); |
| 91 | - $cmd = 'tar -rf ' . escapeshellarg($this->get('toFile')) . ' '; |
|
| 91 | + $cmd = 'tar -rf '.escapeshellarg($this->get('toFile')).' '; |
|
| 92 | 92 | |
| 93 | 93 | if ($this->get('tmpCopy', true)) { |
| 94 | - $tmpFolder = basename($this->get('toFile')) . '-' . uniqid(); |
|
| 94 | + $tmpFolder = basename($this->get('toFile')).'-'.uniqid(); |
|
| 95 | 95 | $filesystem->ensureDirectoryExists($tmpFolder); |
| 96 | 96 | |
| 97 | 97 | foreach ($this->getFiles() as $file) { |
| 98 | - $filesystem->copy($file, $tmpFolder . '/' . $file); |
|
| 98 | + $filesystem->copy($file, $tmpFolder.'/'.$file); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - $this->console->createProcess($cmd . ' -C ' . escapeshellarg($tmpFolder) . ' .')->run(); |
|
| 101 | + $this->console->createProcess($cmd.' -C '.escapeshellarg($tmpFolder).' .')->run(); |
|
| 102 | 102 | |
| 103 | 103 | $filesystem->remove($tmpFolder); |
| 104 | 104 | } else { |
| 105 | 105 | foreach ($this->getFiles() as $file) { |
| 106 | - $this->console->createProcess($cmd . escapeshellarg($file))->run(); |
|
| 106 | + $this->console->createProcess($cmd.escapeshellarg($file))->run(); |
|
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | } |
@@ -39,10 +39,10 @@ |
||
| 39 | 39 | if ($name === 'command') { |
| 40 | 40 | if (is_array($value)) { |
| 41 | 41 | foreach ($value as &$item) { |
| 42 | - $item = 'git ' . $item; |
|
| 42 | + $item = 'git '.$item; |
|
| 43 | 43 | } |
| 44 | 44 | } else { |
| 45 | - $value = 'git ' . $value; |
|
| 45 | + $value = 'git '.$value; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | parent::offsetSet($name, $value); |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | foreach (array('key', 'value') as $name) { |
| 114 | 114 | if ($$name) { |
| 115 | 115 | if ($this->has($$name)) { |
| 116 | - throw new Exception('Variable ' . $$name . ' is already present'); |
|
| 116 | + throw new Exception('Variable '.$$name.' is already present'); |
|
| 117 | 117 | } |
| 118 | 118 | $this->as[$name] = $$name; |
| 119 | 119 | } |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | $code = "<?php\n"; |
| 88 | 88 | foreach (array('to', 'from', 'filter', 'cliStub', 'webStub', 'alias', 'metadata') as $var) { |
| 89 | 89 | $value = $this->get($var); |
| 90 | - $code .= '$' . $var . " = unserialize('" . serialize($value) . "');\n"; |
|
| 90 | + $code .= '$'.$var." = unserialize('".serialize($value)."');\n"; |
|
| 91 | 91 | } |
| 92 | 92 | $code .= ' |
| 93 | 93 | $phar = new \Phar($to); |