@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @link http://www.netresearch.de |
12 | 12 | */ |
13 | 13 | |
14 | -require_once __DIR__ . '/bootstrap.php'; |
|
14 | +require_once __DIR__.'/bootstrap.php'; |
|
15 | 15 | |
16 | 16 | use TYPO3\CMS\Core\Utility\GeneralUtility; |
17 | 17 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if ($execute) { |
42 | 42 | $GLOBALS['TYPO3_DB']->admin_query($query); |
43 | 43 | if ($GLOBALS['TYPO3_DB']->sql_error()) { |
44 | - throw new \Exception('SQL-Error: ' . $GLOBALS['TYPO3_DB']->sql_error()); |
|
44 | + throw new \Exception('SQL-Error: '.$GLOBALS['TYPO3_DB']->sql_error()); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @link http://www.netresearch.de |
13 | 13 | */ |
14 | 14 | |
15 | -require __DIR__ . '/bootstrap.php'; |
|
15 | +require __DIR__.'/bootstrap.php'; |
|
16 | 16 | |
17 | 17 | $dataHandler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\DataHandling\DataHandler'); |
18 | 18 | $dataHandler->stripslashes_values = 0; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | die('Access denied'); |
22 | 22 | } |
23 | 23 | |
24 | -define('PATH_site', getcwd() . DIRECTORY_SEPARATOR); |
|
24 | +define('PATH_site', getcwd().DIRECTORY_SEPARATOR); |
|
25 | 25 | |
26 | 26 | $typo3VersionIsMinimum7 = true; |
27 | 27 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | if ($typo3VersionIsMinimum7) { |
36 | - $classLoader = include getcwd() . '/typo3_src/vendor/autoload.php'; |
|
36 | + $classLoader = include getcwd().'/typo3_src/vendor/autoload.php'; |
|
37 | 37 | \TYPO3\CMS\Core\Core\Bootstrap::getInstance() |
38 | 38 | ->initializeClassLoader($classLoader) |
39 | 39 | ->baseSetup(PATH_site) |
@@ -14,8 +14,6 @@ |
||
14 | 14 | |
15 | 15 | namespace Netresearch\Kite\ExpressionLanguage; |
16 | 16 | use Netresearch\Kite\Task; |
17 | - |
|
18 | -use Symfony\Component\Console\Question\ChoiceQuestion; |
|
19 | 17 | use Symfony\Component\Console\Question\ConfirmationQuestion; |
20 | 18 | use Symfony\Component\Console\Question\Question; |
21 | 19 | use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | { |
123 | 123 | parent::registerFunctions(); |
124 | 124 | $functions = [ |
125 | - 'call' => function (array $values, $function) { |
|
125 | + 'call' => function(array $values, $function) { |
|
126 | 126 | $args = array_slice(func_get_args(), 2); |
127 | 127 | if (array_key_exists($function, $this->functions)) { |
128 | 128 | array_unshift($args, $values); |
@@ -130,29 +130,29 @@ discard block |
||
130 | 130 | } |
131 | 131 | return call_user_func_array($function, $args); |
132 | 132 | }, |
133 | - 'isset' => function (array $values, $var) { |
|
133 | + 'isset' => function(array $values, $var) { |
|
134 | 134 | return $values[self::VARIABLES_KEY]->has($var); |
135 | 135 | }, |
136 | - 'empty' => function (array $values, $var) { |
|
136 | + 'empty' => function(array $values, $var) { |
|
137 | 137 | return !$values[self::VARIABLES_KEY]->has($var) || !$values[self::VARIABLES_KEY]->get($var); |
138 | 138 | }, |
139 | - 'get' => function (array $values, $var) { |
|
139 | + 'get' => function(array $values, $var) { |
|
140 | 140 | return $values[self::VARIABLES_KEY]->get($var); |
141 | 141 | }, |
142 | - 'set' => function (array $values, $var, $value) { |
|
142 | + 'set' => function(array $values, $var, $value) { |
|
143 | 143 | $values[self::VARIABLES_KEY]->set($var, $value); |
144 | 144 | return $value; |
145 | 145 | }, |
146 | - 'confirm' => function (array $values, $question) { |
|
146 | + 'confirm' => function(array $values, $question) { |
|
147 | 147 | return $this->ask($values[self::VARIABLES_KEY], new ConfirmationQuestion("<question>$question</question> [y] ")); |
148 | 148 | }, |
149 | - 'answer' => function (array $values, $question) { |
|
149 | + 'answer' => function(array $values, $question) { |
|
150 | 150 | return $this->ask($values[self::VARIABLES_KEY], new Question("<question>$question</question> ")); |
151 | 151 | }, |
152 | - 'choose' => function (array $values, $question) { |
|
152 | + 'choose' => function(array $values, $question) { |
|
153 | 153 | return $this->ask($values[self::VARIABLES_KEY], new Question("<question>$question</question> ")); |
154 | 154 | }, |
155 | - 'replace' => function (array $values, $search, $replace, $subject, $regex = false) { |
|
155 | + 'replace' => function(array $values, $search, $replace, $subject, $regex = false) { |
|
156 | 156 | $values[self::VARIABLES_KEY]->console->output( |
157 | 157 | '<warning>Expression language function "replace" is deprecated ' |
158 | 158 | . 'and will be removed in 1.6.0 - use preg_replace or str_replace</warning>' |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | foreach ($functions as $name => $function) { |
168 | 168 | $this->register( |
169 | 169 | $name, |
170 | - function () { |
|
170 | + function() { |
|
171 | 171 | |
172 | 172 | }, |
173 | 173 | $function |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | if ($requiredVersion !== $version) { |
148 | 148 | $this->assertPackageAllowed($package); |
149 | 149 | if (!$package->git) { |
150 | - throw new Exception("Package {$package->name} required to be installed from source"); |
|
150 | + throw new Exception("package {$package->name} required to be installed from source"); |
|
151 | 151 | } |
152 | 152 | if ($autoFix) { |
153 | 153 | $fix = true; |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | protected function assertPackageAllowed($package) |
484 | 484 | { |
485 | 485 | if (!$this->isPackageAllowed($package)) { |
486 | - throw new Exception("Package {$package->name} is not in white list"); |
|
486 | + throw new Exception("package {$package->name} is not in white list"); |
|
487 | 487 | } |
488 | 488 | } |
489 | 489 |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $this->git('push', $package->path, array('u' => 'origin', $package->branch)); |
104 | 104 | $this->console->output( |
105 | 105 | str_repeat(chr(8), strlen($package->name)) |
106 | - . '<info>' . $package->name . '</info>' |
|
106 | + . '<info>'.$package->name.'</info>' |
|
107 | 107 | ); |
108 | 108 | unset($this->pushPackages[$i]); |
109 | 109 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $unfixedRequirements = 0; |
148 | 148 | while ($packageName = array_shift($checkedOutPackages)) { |
149 | 149 | $branch = $packages[$packageName]->branch; |
150 | - $version = 'dev-' . $branch; |
|
150 | + $version = 'dev-'.$branch; |
|
151 | 151 | foreach ($this->getPackages(false, false) as $package) { |
152 | 152 | if (array_key_exists($packageName, $package->requires)) { |
153 | 153 | // TODO: Set required version to branch alias, if any |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $this->assertPackageIsWhiteListed($package); |
206 | 206 | |
207 | 207 | $currentVersion = $package->requires[$requiredPackage]; |
208 | - $composerFile = $package->path . '/composer.json'; |
|
208 | + $composerFile = $package->path.'/composer.json'; |
|
209 | 209 | $composerFileContents = file_get_contents($composerFile); |
210 | 210 | $newComposerFileContents = preg_replace( |
211 | 211 | sprintf( |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | preg_quote($requiredPackage, '/'), |
214 | 214 | preg_quote($currentVersion, '/') |
215 | 215 | ), |
216 | - '$1' . $newVersion, |
|
216 | + '$1'.$newVersion, |
|
217 | 217 | $composerFileContents |
218 | 218 | ); |
219 | 219 | file_put_contents($composerFile, $newComposerFileContents); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | if (!$package->git) { |
273 | 273 | throw new Exception('Non git package can not be checked out'); |
274 | 274 | } |
275 | - $remoteBranch = 'origin/' . $branch; |
|
275 | + $remoteBranch = 'origin/'.$branch; |
|
276 | 276 | $isRemote = in_array($remoteBranch, $package->branches, true); |
277 | 277 | if (in_array($branch, $package->branches, true)) { |
278 | 278 | $this->git('checkout', $package->path, $branch); |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | } elseif ($create) { |
282 | 282 | $branches = array_unique( |
283 | 283 | array_map( |
284 | - function ($el) { |
|
284 | + function($el) { |
|
285 | 285 | $parts = explode('/', $el); |
286 | 286 | return array_pop($parts); |
287 | 287 | }, |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | $this->console->output("Checked out <comment>{$package->name}</comment> at <comment>$branch</comment>"); |
314 | 314 | |
315 | 315 | $this->reloadRequires($package); |
316 | - $package->version = 'dev-' . $branch; |
|
316 | + $package->version = 'dev-'.$branch; |
|
317 | 317 | $package->branch = $branch; |
318 | 318 | |
319 | 319 | return true; |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | throw new Exception('Non git package can not be merged'); |
338 | 338 | } |
339 | 339 | |
340 | - $this->git('fetch', $package->path, array('force' => true, 'origin', $branch . ':' . $branch)); |
|
340 | + $this->git('fetch', $package->path, array('force' => true, 'origin', $branch.':'.$branch)); |
|
341 | 341 | |
342 | 342 | $ff = $branch == 'master' ? 'ff' : 'no-ff'; |
343 | 343 | $optArg = array($ff => true, 'no-commit' => true); |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | if (!$message) { |
372 | 372 | $message = $this->answer( |
373 | 373 | 'Enter commit message:', |
374 | - 'Merged ' . $branch . ' into ' . $package->branch |
|
374 | + 'Merged '.$branch.' into '.$package->branch |
|
375 | 375 | ); |
376 | 376 | } |
377 | 377 | $this->git('commit', $package->path, array('n' => true, 'm' => $message)); |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | */ |
393 | 393 | private function resolveRequirementsConflict($package) |
394 | 394 | { |
395 | - $contents = file_get_contents($package->path . '/composer.json'); |
|
395 | + $contents = file_get_contents($package->path.'/composer.json'); |
|
396 | 396 | $ours = @json_decode( |
397 | 397 | preg_replace('/^<{7}.+\n(.+)\n(\|{7}|={7}).+>{7}.+$/smU', '$1', $contents) |
398 | 398 | ); |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | } |
414 | 414 | |
415 | 415 | $theirs['require'] = $this->mergeRequirements($package, $ours, $theirs); |
416 | - file_put_contents($package->path . '/composer.json', $this->jsonEncode($theirs)); |
|
416 | + file_put_contents($package->path.'/composer.json', $this->jsonEncode($theirs)); |
|
417 | 417 | } |
418 | 418 | |
419 | 419 | /** |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | { |
428 | 428 | return json_encode( |
429 | 429 | $var, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE |
430 | - ) . "\n"; |
|
430 | + )."\n"; |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | /** |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | $theirsRequire = isset($theirs['require']) && is_object($theirs['require']) ? get_object_vars($theirs['require']) : []; |
446 | 446 | $mergedRequires = array_merge($oursRequire, $theirsRequire); |
447 | 447 | $packages = $this->getPackages(false, false); |
448 | - $preferredVersion = 'dev-' . $package->branch; |
|
448 | + $preferredVersion = 'dev-'.$package->branch; |
|
449 | 449 | foreach ($mergedRequires as $packageName => $version) { |
450 | 450 | $actualVersion = ($version === '@dev') ? 'dev-master' : $version; |
451 | 451 | if (array_key_exists($packageName, $oursRequire) |
@@ -537,9 +537,9 @@ discard block |
||
537 | 537 | if (!is_array($this->whitelists)) { |
538 | 538 | $this->whitelists = []; |
539 | 539 | foreach (['path', 'remote', 'name'] as $whiteListType) { |
540 | - $option = $this->get('whitelist' . ucfirst($whiteListType) . 's'); |
|
540 | + $option = $this->get('whitelist'.ucfirst($whiteListType).'s'); |
|
541 | 541 | if ($option) { |
542 | - $this->whitelists[$whiteListType] = '#^' . $option . '$#'; |
|
542 | + $this->whitelists[$whiteListType] = '#^'.$option.'$#'; |
|
543 | 543 | } |
544 | 544 | } |
545 | 545 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | /** |
106 | 106 | * Handle onBefore, onAfter and name |
107 | 107 | * |
108 | - * @param mixed $offset The name of the variable |
|
108 | + * @param string $offset The name of the variable |
|
109 | 109 | * @param mixed $value The value |
110 | 110 | * |
111 | 111 | * @return void |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | /** |
159 | 159 | * Generate name if it doesn't exist |
160 | 160 | * |
161 | - * @param mixed $offset The name of the variable |
|
161 | + * @param string $offset The name of the variable |
|
162 | 162 | * |
163 | 163 | * @return mixed |
164 | 164 | */ |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | 'type' => 'shell', |
40 | 40 | 'command' => [ |
41 | 41 | 'rm -rf typo3temp/Cache/*', |
42 | - '{config["php"]} ' . __DIR__ . '/typo3/clear-cache.php', |
|
43 | - '{config["php"]} ' . __DIR__ . '/typo3/schema-migration.php', |
|
42 | + '{config["php"]} '.__DIR__.'/typo3/clear-cache.php', |
|
43 | + '{config["php"]} '.__DIR__.'/typo3/schema-migration.php', |
|
44 | 44 | ], |
45 | 45 | 'processSettings' => ['pt' => true] |
46 | 46 | ] |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ['workflow' => 'clearCodeCaches'], |
64 | 64 | [ |
65 | 65 | 'type' => 'scp', |
66 | - 'from' => __DIR__ . '/typo3', |
|
66 | + 'from' => __DIR__.'/typo3', |
|
67 | 67 | 'to' => '{node}:{node.deployPath}/current/{config["workspace"]}/typo3' |
68 | 68 | ], |
69 | 69 | [ |
@@ -70,12 +70,12 @@ discard block |
||
70 | 70 | if (is_string($composerJson)) { |
71 | 71 | $path = realpath($composerJson); |
72 | 72 | if (!$path) { |
73 | - throw new Exception('Could not find ' . $composerJson); |
|
73 | + throw new Exception('Could not find '.$composerJson); |
|
74 | 74 | } |
75 | 75 | $this->path = dirname($path); |
76 | 76 | $composerJson = json_decode(file_get_contents($path)); |
77 | 77 | if (!is_object($composerJson)) { |
78 | - throw new Exception('Could not load ' . $path); |
|
78 | + throw new Exception('Could not load '.$path); |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | foreach (get_object_vars($composerJson) as $key => $value) { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | switch ($name) { |
98 | 98 | case 'git': |
99 | - $gitDir = $this->path . '/.git'; |
|
99 | + $gitDir = $this->path.'/.git'; |
|
100 | 100 | $this->git = file_exists($gitDir) && is_dir($gitDir); |
101 | 101 | break; |
102 | 102 | case 'branches': |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $this->loadRequires(); |
115 | 115 | break; |
116 | 116 | default: |
117 | - throw new Exception('Invalid property ' . $name); |
|
117 | + throw new Exception('Invalid property '.$name); |
|
118 | 118 | |
119 | 119 | } |
120 | 120 | return $this->$name; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function reloadRequires() |
160 | 160 | { |
161 | - $file = $this->path . '/composer.json'; |
|
161 | + $file = $this->path.'/composer.json'; |
|
162 | 162 | if (file_exists($file)) { |
163 | 163 | $composerJson = json_decode(file_get_contents($file)); |
164 | 164 | unset($this->require); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | if ($this->git) { |
213 | 213 | $this->composer->git('fetch', $this->path, array('p' => true, 'origin')); |
214 | 214 | try { |
215 | - $format = (self::$forEachRefHeadSupported ? '%(HEAD)' : '') . '|%(refname:short)|%(upstream:short)'; |
|
215 | + $format = (self::$forEachRefHeadSupported ? '%(HEAD)' : '').'|%(refname:short)|%(upstream:short)'; |
|
216 | 216 | $gitBr = $this->composer->git('for-each-ref', $this->path, ['format' => $format, 'refs/heads/', 'refs/remotes/origin']); |
217 | 217 | } catch (Exception\ProcessFailedException $e) { |
218 | 218 | if (trim($e->getProcess()->getErrorOutput()) === 'fatal: unknown field name: HEAD') { |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | try { |
253 | 253 | $this->tag = trim($this->composer->git('describe', $this->path, array('exact-match' => true, 'tags' => true))); |
254 | 254 | } catch (Exception\ProcessFailedException $e) { |
255 | - $this->tag = null; |
|
255 | + $this->tag = null; |
|
256 | 256 | } |
257 | 257 | } |
258 | 258 | } |
@@ -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; |
@@ -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)", |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | if ($package->git && !$package->isRoot) { |
422 | 422 | $remote = false; |
423 | 423 | do { |
424 | - $reference = ($remote ? 'origin/' : '') . $package->source->reference; |
|
424 | + $reference = ($remote ? 'origin/' : '').$package->source->reference; |
|
425 | 425 | try { |
426 | 426 | $rawCounts = $this->git('rev-list', $package->path, "--count --left-right --cherry-pick {$reference}..."); |
427 | 427 | break; |
@@ -436,9 +436,9 @@ discard block |
||
436 | 436 | if ($counts[0] || $counts[1]) { |
437 | 437 | $num = $counts[0] ?: $counts[1]; |
438 | 438 | $type = $counts[0] ? 'behind</>' : 'ahead</> of'; |
439 | - return '%s is <comment>' . $num . ' commit' . ($num > 1 ? 's ' : ' ') |
|
440 | - . $type . ' locked commit <comment>' |
|
441 | - . substr($package->source->reference, 0, 7) . '</>'; |
|
439 | + return '%s is <comment>'.$num.' commit'.($num > 1 ? 's ' : ' ') |
|
440 | + . $type.' locked commit <comment>' |
|
441 | + . substr($package->source->reference, 0, 7).'</>'; |
|
442 | 442 | } |
443 | 443 | } |
444 | 444 | return null; |
@@ -556,12 +556,12 @@ discard block |
||
556 | 556 | $side = $i ? 'left' : 'right'; |
557 | 557 | $otherSide = $i ? 'right' : 'left'; |
558 | 558 | $args = "--$side-only --cherry-pick --pretty=format:'%C(yellow)%h %Cgreen%cd %an%Creset%n %s' --abbrev-commit --date=local "; |
559 | - $args .= $ref . '...'; |
|
559 | + $args .= $ref.'...'; |
|
560 | 560 | $log = $this->git('log', $package->path, $args, array('shy' => true)); |
561 | 561 | if ($log) { |
562 | 562 | $this->console->output(''); |
563 | 563 | |
564 | - $title = "<info>{${$side . 'Title'}}</info> > <info>{${$otherSide . 'Title'}}</info>"; |
|
564 | + $title = "<info>{${$side.'Title'}}</info> > <info>{${$otherSide.'Title'}}</info>"; |
|
565 | 565 | $this->output($title); |
566 | 566 | $this->console->output(str_repeat('-', strlen(strip_tags($title)))); |
567 | 567 |