@@ -49,7 +49,7 @@ |
||
49 | 49 | ], |
50 | 50 | 'task' => [ |
51 | 51 | 'type' => 'callback', |
52 | - 'callback' => function (\Netresearch\Kite\Job $job) { |
|
52 | + 'callback' => function(\Netresearch\Kite\Job $job) { |
|
53 | 53 | $git = $job->get('git'); |
54 | 54 | $command = $job->get('cmd'); |
55 | 55 | foreach ($job->get('composer.packages') as $package) { |
@@ -172,10 +172,10 @@ |
||
172 | 172 | } |
173 | 173 | if ($isTest) { |
174 | 174 | if ($isFunctionCall) { |
175 | - throw new SyntaxError('Can\'t use function return value in write context', $stream->current->cursor); |
|
175 | + throw new SyntaxError('Can\'t use function return value in write context', $stream->current->cursor); |
|
176 | 176 | } |
177 | 177 | if (!$stream->current->test(Token::PUNCTUATION_TYPE, ')')) { |
178 | - throw new SyntaxError('Expected )', $stream->current->cursor); |
|
178 | + throw new SyntaxError('Expected )', $stream->current->cursor); |
|
179 | 179 | } |
180 | 180 | $tokens[] = new Token(Token::STRING_TYPE, implode('.', $names), $token->cursor); |
181 | 181 | } else { |
@@ -51,7 +51,7 @@ |
||
51 | 51 | public function execute() |
52 | 52 | { |
53 | 53 | ob_start( |
54 | - function ($output) { |
|
54 | + function($output) { |
|
55 | 55 | $this->console->output($output, false); |
56 | 56 | return ''; |
57 | 57 | }, 2, 0 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | if (!$rollback && !$restore) { |
89 | 89 | $this->checkout(); |
90 | 90 | $this->release = date($this->get('releaseFormat', 'YmdHis')); |
91 | - $this->set('releaseDir', 'releases/' . $this->release); |
|
91 | + $this->set('releaseDir', 'releases/'.$this->release); |
|
92 | 92 | $this->release(); |
93 | 93 | $this->shareResources(); |
94 | 94 | } |
@@ -195,9 +195,9 @@ discard block |
||
195 | 195 | protected function activate() |
196 | 196 | { |
197 | 197 | $sub = $this->iterate('{nodes}', 'node'); |
198 | - $sub->message('<step>Activating ' . ($this->release ? 'new' : 'latest') . ' release</step>'); |
|
198 | + $sub->message('<step>Activating '.($this->release ? 'new' : 'latest').' release</step>'); |
|
199 | 199 | $sub->callback( |
200 | - function (Task\IterateTask $iterator) { |
|
200 | + function(Task\IterateTask $iterator) { |
|
201 | 201 | $links = $iterator->remoteShell('echo "`readlink previous`;`readlink current`;`readlink next`"', '{node.deployPath}'); |
202 | 202 | list($previous, $current, $next) = explode(';', $links); |
203 | 203 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | |
214 | 214 | $commands = array("ln -sfn $next current; rm next"); |
215 | 215 | if ($current) { |
216 | - $from = '<comment>' . basename($current) . '</comment>'; |
|
216 | + $from = '<comment>'.basename($current).'</comment>'; |
|
217 | 217 | array_unshift($commands, "ln -s $current previous"); |
218 | 218 | if ($previous) { |
219 | 219 | array_unshift($commands, "rm previous; rm -rf $previous"); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $sub = $this->iterate('{nodes}', 'node'); |
253 | 253 | $sub->message('<step>Restoring previous release</step>'); |
254 | 254 | $sub->callback( |
255 | - function (Task\IterateTask $iterator) use (&$firstPreviousRelease) { |
|
255 | + function(Task\IterateTask $iterator) use (&$firstPreviousRelease) { |
|
256 | 256 | $links = $iterator->remoteShell('echo "`readlink previous`;`readlink current`;`readlink next`"', '{node.deployPath}'); |
257 | 257 | list($previous, $current, $next) = explode(';', $links); |
258 | 258 | if (!$previous) { |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $commands = array("ln -sfn $previous current; rm previous"); |
270 | 270 | if ($current) { |
271 | 271 | array_unshift($commands, "ln -s $current next"); |
272 | - $from = '<comment>' . basename($current) . '</comment>'; |
|
272 | + $from = '<comment>'.basename($current).'</comment>'; |
|
273 | 273 | } else { |
274 | 274 | $from = '<warning>none</warning>'; |
275 | 275 | } |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | $sub = $this->iterate('{shared}', array('type' => 'entries')); |
293 | 293 | $sub->message('<step>Linking shared resources</step>'); |
294 | 294 | $sub->callback( |
295 | - function (Task\IterateTask $iterator) { |
|
295 | + function(Task\IterateTask $iterator) { |
|
296 | 296 | $type = $iterator->get('type'); |
297 | 297 | if (!in_array($type, array('dirs', 'files'), true)) { |
298 | 298 | $iterator->doExit('shared may only contain keys "dirs" or "files"', 1); |
@@ -311,13 +311,13 @@ discard block |
||
311 | 311 | } |
312 | 312 | |
313 | 313 | $commands[] = 'cd {releaseDir}'; |
314 | - $commands[] = 'rm -rf ' . $entry; |
|
314 | + $commands[] = 'rm -rf '.$entry; |
|
315 | 315 | if ($dirName) { |
316 | - $commands[] = 'mkdir -p ' . $dirName; |
|
317 | - $commands[] = 'cd ' . $dirName; |
|
316 | + $commands[] = 'mkdir -p '.$dirName; |
|
317 | + $commands[] = 'cd '.$dirName; |
|
318 | 318 | $subDirCount += substr_count($dirName, '/') + 1; |
319 | 319 | } |
320 | - $commands[] = 'ln -s ' . str_repeat('../', $subDirCount) . $shareDir . '/' . $entry; |
|
320 | + $commands[] = 'ln -s '.str_repeat('../', $subDirCount).$shareDir.'/'.$entry; |
|
321 | 321 | |
322 | 322 | $iterator->remoteShell($commands, '{node.deployPath}'); |
323 | 323 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | public function assemble() |
61 | 61 | { |
62 | 62 | $this->callback( |
63 | - function () { |
|
63 | + function() { |
|
64 | 64 | $this->findLoaders(); |
65 | 65 | $file = $this->get('file'); |
66 | 66 | $this->console->getFilesystem()->ensureDirectoryExists(dirname($file)); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | foreach (['task', 'workflow'] as $type) { |
111 | 111 | $lines[] = ''; |
112 | - $lines[] = ucfirst($type) . 's'; |
|
112 | + $lines[] = ucfirst($type).'s'; |
|
113 | 113 | $lines[] = str_repeat('=', strlen($type) + 1); |
114 | 114 | $lines[] = ''; |
115 | 115 | $taskObjects = $this->loadTaskObjects($type); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $lines[] = 'Options'; |
140 | 140 | $lines[] = '```````'; |
141 | 141 | $lines[] = ''; |
142 | - $this->renderVariables($lines, $taskVariables, $type . '-' . $name); |
|
142 | + $this->renderVariables($lines, $taskVariables, $type.'-'.$name); |
|
143 | 143 | } |
144 | 144 | if ($taskCommonVariables) { |
145 | 145 | $lines[] = 'Common options'; |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $keys = ['type', 'default', 'required', 'label']; |
176 | 176 | $lines[] = ' * - Name'; |
177 | 177 | foreach ($keys as $key) { |
178 | - $lines[] = ' - ' . ucfirst($key); |
|
178 | + $lines[] = ' - '.ucfirst($key); |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | foreach ($variables as $configName => $config) { |
@@ -184,11 +184,11 @@ discard block |
||
184 | 184 | } |
185 | 185 | $lines[] = ' * - '; |
186 | 186 | $lines[] = ''; |
187 | - $lines[] = ' .. |' . $anchorPrefix . '-' . $configName . '| replace:: ' . $configName; |
|
187 | + $lines[] = ' .. |'.$anchorPrefix.'-'.$configName.'| replace:: '.$configName; |
|
188 | 188 | $lines[] = ''; |
189 | - $lines[] = ' .. _' . $anchorPrefix . '-' . $configName . ':'; |
|
189 | + $lines[] = ' .. _'.$anchorPrefix.'-'.$configName.':'; |
|
190 | 190 | $lines[] = ''; |
191 | - $lines[] = ' ' . $configName; |
|
191 | + $lines[] = ' '.$configName; |
|
192 | 192 | $lines[] = ''; |
193 | 193 | foreach ($keys as $key) { |
194 | 194 | if (!array_key_exists($key, $config)) { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $v = $config[$key]; |
198 | 198 | $value = $v === null ? 'null' : ($v === true ? 'true' : ($v === false ? 'false' : $v)); |
199 | 199 | if (is_string($value)) { |
200 | - $value = ':code:`' . $value . '`'; |
|
200 | + $value = ':code:`'.$value.'`'; |
|
201 | 201 | } |
202 | 202 | } elseif ($key === 'required') { |
203 | 203 | $value = $config[$key] === true ? 'X' : $config[$key]; |
@@ -205,12 +205,12 @@ discard block |
||
205 | 205 | $value = $config[$key]; |
206 | 206 | } |
207 | 207 | if (is_array($value)) { |
208 | - $value = "\n\n .. code::php\n\n " . str_replace("\n", "\n\n ", call_user_func('print' . '_r', $value, true)) . "\n\n"; |
|
208 | + $value = "\n\n .. code::php\n\n ".str_replace("\n", "\n\n ", call_user_func('print'.'_r', $value, true))."\n\n"; |
|
209 | 209 | } else { |
210 | 210 | $value = str_replace("\n", "\n\n ", $value); |
211 | 211 | } |
212 | - $value = preg_replace('/\{@see\s+(' . implode('|', array_keys($variables)) . ')\}/', '|' . $anchorPrefix . '-$1|_', $value); |
|
213 | - $lines[] = ' - ' . $value; |
|
212 | + $value = preg_replace('/\{@see\s+('.implode('|', array_keys($variables)).')\}/', '|'.$anchorPrefix.'-$1|_', $value); |
|
213 | + $lines[] = ' - '.$value; |
|
214 | 214 | } |
215 | 215 | } |
216 | 216 | $lines[] = ''; |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | { |
226 | 226 | static $commonVars; |
227 | 227 | if (!is_array($commonVars)) { |
228 | - $className = 'NetresearchKiteTask' . uniqid(); |
|
229 | - eval('class ' . $className . ' extends \\Netresearch\\Kite\\Task {}'); |
|
228 | + $className = 'NetresearchKiteTask'.uniqid(); |
|
229 | + eval('class '.$className.' extends \\Netresearch\\Kite\\Task {}'); |
|
230 | 230 | $instance = new $className($this); |
231 | 231 | $commonVars = $instance->get('_variableConfiguration'); |
232 | 232 | } |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | protected function loadTaskObjects($type) |
244 | 244 | { |
245 | 245 | $objects = []; |
246 | - $requiredType = 'Netresearch\\Kite\\' . ucfirst($type); |
|
246 | + $requiredType = 'Netresearch\\Kite\\'.ucfirst($type); |
|
247 | 247 | foreach ($this->factory->getNamespaces($type) as $namespace) { |
248 | 248 | $namespaceLength = strlen($namespace); |
249 | 249 | if ($dir = $this->findDirectoryForNamespace($namespace)) { |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | if (substr($file, -4) !== '.php') { |
252 | 252 | continue; |
253 | 253 | } |
254 | - $class = $namespace . '\\' . substr(strtr($file, '/', '\\'), 0, -4); |
|
254 | + $class = $namespace.'\\'.substr(strtr($file, '/', '\\'), 0, -4); |
|
255 | 255 | $reflectionClass = new \ReflectionClass($class); |
256 | 256 | if (!$reflectionClass->isSubclassOf($requiredType) || !$reflectionClass->isInstantiable()) { |
257 | 257 | continue; |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | continue; |
339 | 339 | } |
340 | 340 | foreach ($dirs as $dir) { |
341 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { |
|
341 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $length))) { |
|
342 | 342 | return $file; |
343 | 343 | } |
344 | 344 | } |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | |
347 | 347 | // PSR-4 fallback dirs |
348 | 348 | foreach ($loader->getFallbackDirsPsr4() as $dir) { |
349 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
349 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
350 | 350 | return $file; |
351 | 351 | } |
352 | 352 | } |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | foreach ($loader->getPrefixes() as $prefix => $dirs) { |
365 | 365 | if (0 === strpos($namespace, $prefix)) { |
366 | 366 | foreach ($dirs as $dir) { |
367 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
367 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
368 | 368 | return $file; |
369 | 369 | } |
370 | 370 | } |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | |
374 | 374 | // PSR-0 fallback dirs |
375 | 375 | foreach ($loader->getFallbackDirs() as $dir) { |
376 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
376 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
377 | 377 | return $file; |
378 | 378 | } |
379 | 379 | } |
@@ -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))) |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | } |
333 | 333 | } |
334 | 334 | } |
335 | - $constraint = $package->tag ?: 'dev-' . $package->branch; |
|
335 | + $constraint = $package->tag ?: 'dev-'.$package->branch; |
|
336 | 336 | if ($package->requiredBranch && $package->requiredBranch !== $package->branch) { |
337 | 337 | return "%s is at <comment>$constraint</comment> but is required at <comment>dev-{$package->requiredBranch}</comment>"; |
338 | 338 | } |
@@ -353,8 +353,8 @@ discard block |
||
353 | 353 | if ($package->invalidRequirements) { |
354 | 354 | $this->doExit('Can not fix that', 1); |
355 | 355 | } |
356 | - $currentConstraint = $package->tag ?: 'dev-' . $package->branch; |
|
357 | - $requiredConstraint = 'dev-' . $package->requiredBranch; |
|
356 | + $currentConstraint = $package->tag ?: 'dev-'.$package->branch; |
|
357 | + $requiredConstraint = 'dev-'.$package->requiredBranch; |
|
358 | 358 | if ($package->requiredBranch) { |
359 | 359 | $actions = array( |
360 | 360 | 1 => "Show divergent commits between <comment>$currentConstraint</comment> and <comment>$requiredConstraint</comment> (and ask again)", |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | protected function checkDivergeFromLock($package) |
406 | 406 | { |
407 | 407 | if ($package->git && !$package->isRoot) { |
408 | - $constraint = $package->tag ? ltrim($package->tag, 'v') : 'dev-' . $package->branch; |
|
408 | + $constraint = $package->tag ? ltrim($package->tag, 'v') : 'dev-'.$package->branch; |
|
409 | 409 | if (($package->tag || $package->branch) && $package->version !== $constraint) { |
410 | 410 | if ($this->git('rev-parse', $package->path, 'HEAD') === $package->source->reference) { |
411 | 411 | // HEAD is tip of branch and tag - so only branch was detected |
@@ -418,9 +418,9 @@ discard block |
||
418 | 418 | if ($counts[0] || $counts[1]) { |
419 | 419 | $num = $counts[0] ?: $counts[1]; |
420 | 420 | $type = $counts[0] ? 'behind</>' : 'ahead</> of'; |
421 | - return '%s is <comment>' . $num . ' commit' . ($num > 1 ? 's ' : ' ') |
|
422 | - . $type . ' locked commit <comment>' |
|
423 | - . substr($package->source->reference, 0, 7) . '</>'; |
|
421 | + return '%s is <comment>'.$num.' commit'.($num > 1 ? 's ' : ' ') |
|
422 | + . $type.' locked commit <comment>' |
|
423 | + . substr($package->source->reference, 0, 7).'</>'; |
|
424 | 424 | } |
425 | 425 | } |
426 | 426 | return null; |
@@ -538,12 +538,12 @@ discard block |
||
538 | 538 | $side = $i ? 'left' : 'right'; |
539 | 539 | $otherSide = $i ? 'right' : 'left'; |
540 | 540 | $args = "--$side-only --cherry-pick --pretty=format:'%C(yellow)%h %Cgreen%cd %an%Creset%n %s' --abbrev-commit --date=local "; |
541 | - $args .= $ref . '...'; |
|
541 | + $args .= $ref.'...'; |
|
542 | 542 | $log = $this->git('log', $package->path, $args, array('shy' => true)); |
543 | 543 | if ($log) { |
544 | 544 | $this->console->output(''); |
545 | 545 | |
546 | - $title = "<info>{${$side . 'Title'}}</info> > <info>{${$otherSide . 'Title'}}</info>"; |
|
546 | + $title = "<info>{${$side.'Title'}}</info> > <info>{${$otherSide.'Title'}}</info>"; |
|
547 | 547 | $this->output($title); |
548 | 548 | $this->console->output(str_repeat('-', strlen(strip_tags($title)))); |
549 | 549 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | public function assemble() |
67 | 67 | { |
68 | 68 | $this->callback( |
69 | - function () { |
|
69 | + function() { |
|
70 | 70 | $this->checkoutPackages( |
71 | 71 | (array) $this->get('branch'), |
72 | 72 | $this->get('merge'), |
@@ -109,9 +109,9 @@ discard block |
||
109 | 109 | $lastBranch = array_pop($branches); |
110 | 110 | $message = 'Could not find branch '; |
111 | 111 | if ($branches) { |
112 | - $message .= implode(', ', $branches) . ' or '; |
|
112 | + $message .= implode(', ', $branches).' or '; |
|
113 | 113 | } |
114 | - $message .= $lastBranch . ' in any installed package'; |
|
114 | + $message .= $lastBranch.' in any installed package'; |
|
115 | 115 | $this->console->output("<warning>$message</warning>"); |
116 | 116 | return; |
117 | 117 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function assemble() |
78 | 78 | { |
79 | 79 | $this->callback( |
80 | - function () { |
|
80 | + function() { |
|
81 | 81 | $mergeBranch = $this->get('branch'); |
82 | 82 | $diagnose = !$this->get('no-diagnose'); |
83 | 83 | $delete = $this->get('delete', false); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | if ($delete) { |
102 | 102 | $this->git('branch', $package->path, array('d' => $mergeBranch)); |
103 | - $this->git('push', $package->path, array('origin', ':' . $mergeBranch)); |
|
103 | + $this->git('push', $package->path, array('origin', ':'.$mergeBranch)); |
|
104 | 104 | } |
105 | 105 | } |
106 | 106 | |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | $package->branches[] = $checkoutBranch; |
143 | 143 | $inferFromBranch = 'master'; |
144 | 144 | } |
145 | - $this->git('fetch', $package->path, array('force' => true, 'origin', $inferFromBranch . ':' . $checkoutBranch)); |
|
145 | + $this->git('fetch', $package->path, array('force' => true, 'origin', $inferFromBranch.':'.$checkoutBranch)); |
|
146 | 146 | $this->git('checkout', $package->path, array($checkoutBranch)); |
147 | 147 | $package->branch = $checkoutBranch; |
148 | - $package->version = 'dev-' . $checkoutBranch; |
|
148 | + $package->version = 'dev-'.$checkoutBranch; |
|
149 | 149 | } else { |
150 | 150 | continue; |
151 | 151 | } |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | public function assemble() |
58 | 58 | { |
59 | 59 | $this->callback( |
60 | - function () { |
|
60 | + function() { |
|
61 | 61 | $scriptPath = $this->createScript(); |
62 | 62 | if ($webUrl = $this->get('webUrl')) { |
63 | 63 | $this->callScript($webUrl, $scriptPath); |
64 | 64 | } else { |
65 | - $this->scp($scriptPath, '{node}:{node.webRoot}/' . $scriptPath); |
|
65 | + $this->scp($scriptPath, '{node}:{node.webRoot}/'.$scriptPath); |
|
66 | 66 | foreach ($this->get('nodes') as $node) { |
67 | 67 | /* @var \Netresearch\Kite\Node $node */ |
68 | 68 | if ($webUrl = $node->get('webUrl', null)) { |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | */ |
84 | 84 | protected function createScript() |
85 | 85 | { |
86 | - $scriptPath = $this->get('baseDir') . '/ccc-' . uniqid() . '.php'; |
|
86 | + $scriptPath = $this->get('baseDir').'/ccc-'.uniqid().'.php'; |
|
87 | 87 | file_put_contents( |
88 | 88 | $scriptPath, |
89 | - '<?' . "php |
|
89 | + '<?'."php |
|
90 | 90 | if (function_exists('clearstatcache')) { |
91 | 91 | echo 'statcache|'; |
92 | 92 | clearstatcache(true); |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | */ |
117 | 117 | protected function callScript($baseUrl, $scriptPath) |
118 | 118 | { |
119 | - $url = rtrim($baseUrl, '/') . '/' . ltrim($scriptPath, '/'); |
|
119 | + $url = rtrim($baseUrl, '/').'/'.ltrim($scriptPath, '/'); |
|
120 | 120 | |
121 | - $this->console->output('Calling ' . $url, OutputInterface::VERBOSITY_DEBUG); |
|
121 | + $this->console->output('Calling '.$url, OutputInterface::VERBOSITY_DEBUG); |
|
122 | 122 | $ch = curl_init(); |
123 | 123 | curl_setopt($ch, CURLOPT_URL, $url); |
124 | 124 | curl_setopt($ch, CURLOPT_HEADER, 1); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $this->console->outdent(); |
135 | 135 | } else { |
136 | 136 | if ($caches) { |
137 | - $this->console->output('Cleared code caches (' . implode(', ', $caches) . ')'); |
|
137 | + $this->console->output('Cleared code caches ('.implode(', ', $caches).')'); |
|
138 | 138 | } else { |
139 | 139 | $this->console->output('No code caches found'); |
140 | 140 | } |