@@ -76,25 +76,25 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | $cwd = $this->expand($this->cwd); |
79 | - $cwdCmd = $cwd ? 'cd ' . escapeshellarg($cwd) . '; ' : null; |
|
79 | + $cwdCmd = $cwd ? 'cd '.escapeshellarg($cwd).'; ' : null; |
|
80 | 80 | $toDirParent = dirname(array_pop(explode(':', $to, 2))); |
81 | 81 | if ($toDirParent !== '/') { |
82 | - $prepareDirCmd = 'mkdir -p ' . escapeshellarg($toDirParent); |
|
82 | + $prepareDirCmd = 'mkdir -p '.escapeshellarg($toDirParent); |
|
83 | 83 | if ($toNode) { |
84 | 84 | $prepareDirCmd = $this->getSshCommand($prepareDirCmd, $toNode); |
85 | 85 | } elseif ($cwd && $toDirParent[0] !== '/') { |
86 | - $prepareDirCmd = $cwdCmd . $prepareDirCmd; |
|
86 | + $prepareDirCmd = $cwdCmd.$prepareDirCmd; |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
90 | - $scpCommand = $this->getScpCommand($node) . ' ' . escapeshellarg($from) . ' ' . escapeshellarg($to); |
|
90 | + $scpCommand = $this->getScpCommand($node).' '.escapeshellarg($from).' '.escapeshellarg($to); |
|
91 | 91 | |
92 | 92 | if ($node) { |
93 | 93 | $this->addExpect($scpCommand, $node); |
94 | 94 | } |
95 | 95 | |
96 | 96 | if ($cwdCmd) { |
97 | - $scpCommand = $cwdCmd . $scpCommand; |
|
97 | + $scpCommand = $cwdCmd.$scpCommand; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | return isset($prepareDirCmd) ? array($prepareDirCmd, $scpCommand) : $scpCommand; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | protected function getScpCommand(Node $node) |
111 | 111 | { |
112 | - return rtrim('scp -r ' . trim($node->get('scpOptions'))); |
|
112 | + return rtrim('scp -r '.trim($node->get('scpOptions'))); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -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 | } |