@@ -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 | } |