CS fixes
parent
3cff4a3bb9
commit
0b4a9235f4
|
@ -383,7 +383,7 @@ EOF;
|
|||
}
|
||||
|
||||
if (!$filesCode) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return <<<EOF
|
||||
|
|
|
@ -33,7 +33,6 @@ use Composer\Json\JsonFile;
|
|||
use Composer\Package\AliasPackage;
|
||||
use Composer\Package\CompletePackage;
|
||||
use Composer\Package\Link;
|
||||
use Composer\Package\LinkConstraint\EmptyConstraint;
|
||||
use Composer\Package\LinkConstraint\VersionConstraint;
|
||||
use Composer\Package\Locker;
|
||||
use Composer\Package\PackageInterface;
|
||||
|
@ -1179,7 +1178,6 @@ class Installer
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set whether to run autoloader or not
|
||||
*
|
||||
|
@ -1193,7 +1191,6 @@ class Installer
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set whether to run scripts or not
|
||||
*
|
||||
|
|
|
@ -249,7 +249,7 @@ class ArrayLoader implements LoaderInterface
|
|||
}
|
||||
|
||||
// If using numeric aliases ensure the alias is a valid subversion
|
||||
if(($sourcePrefix = $this->versionParser->parseNumericAliasPrefix($sourceBranch))
|
||||
if (($sourcePrefix = $this->versionParser->parseNumericAliasPrefix($sourceBranch))
|
||||
&& ($targetPrefix = $this->versionParser->parseNumericAliasPrefix($targetBranch))
|
||||
&& (stripos($targetPrefix, $sourcePrefix) !== 0)
|
||||
) {
|
||||
|
|
|
@ -279,13 +279,13 @@ class RootPackageLoader extends ArrayLoader
|
|||
$length = PHP_INT_MAX;
|
||||
|
||||
$nonFeatureBranches = '';
|
||||
if(!empty($config['non-feature-branches'])) {
|
||||
if (!empty($config['non-feature-branches'])) {
|
||||
$nonFeatureBranches = implode('|', $config['non-feature-branches']);
|
||||
}
|
||||
|
||||
foreach ($branches as $candidate) {
|
||||
// return directly, if branch is configured to be non-feature branch
|
||||
if($candidate === $branch && preg_match('{^(' . $nonFeatureBranches . ')$}', $candidate)) {
|
||||
if ($candidate === $branch && preg_match('{^(' . $nonFeatureBranches . ')$}', $candidate)) {
|
||||
return $version;
|
||||
}
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ class ValidatingArrayLoader implements LoaderInterface
|
|||
}
|
||||
|
||||
// If using numeric aliases ensure the alias is a valid subversion
|
||||
if(($sourcePrefix = $this->versionParser->parseNumericAliasPrefix($sourceBranch))
|
||||
if (($sourcePrefix = $this->versionParser->parseNumericAliasPrefix($sourceBranch))
|
||||
&& ($targetPrefix = $this->versionParser->parseNumericAliasPrefix($targetBranch))
|
||||
&& (stripos($targetPrefix, $sourcePrefix) !== 0)
|
||||
) {
|
||||
|
|
|
@ -242,7 +242,7 @@ class GitDriver extends VcsDriver
|
|||
}
|
||||
|
||||
$process = new ProcessExecutor($io);
|
||||
if($process->execute('git ls-remote --heads ' . ProcessExecutor::escape($url), $output) === 0) {
|
||||
if ($process->execute('git ls-remote --heads ' . ProcessExecutor::escape($url), $output) === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ class AutoloadGeneratorTest extends TestCase
|
|||
$ret = $ret();
|
||||
}
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}));
|
||||
|
||||
|
|
|
@ -56,9 +56,10 @@ class ConsoleIOTest extends TestCase
|
|||
$outputMock->expects($this->once())
|
||||
->method('write')
|
||||
->with(
|
||||
$this->callback(function($messages){
|
||||
$this->callback(function ($messages) {
|
||||
$result = preg_match("[(.*)/(.*) First line]", $messages[0]) > 0;
|
||||
$result &= preg_match("[(.*)/(.*) Second line]", $messages[1]) > 0;
|
||||
|
||||
return $result;
|
||||
}),
|
||||
$this->equalTo(false)
|
||||
|
|
|
@ -330,8 +330,7 @@ class InstallerTest extends TestCase
|
|||
);
|
||||
|
||||
$section = null;
|
||||
foreach ($tokens as $i => $token)
|
||||
{
|
||||
foreach ($tokens as $i => $token) {
|
||||
if (null === $section && empty($token)) {
|
||||
continue; // skip leading blank
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ namespace Composer\Test\Mock;
|
|||
use Composer\Composer;
|
||||
use Composer\Config;
|
||||
use Composer\Factory;
|
||||
use Composer\Repository;
|
||||
use Composer\Repository\RepositoryManager;
|
||||
use Composer\Repository\WritableRepositoryInterface;
|
||||
use Composer\Installer;
|
||||
|
|
|
@ -169,9 +169,10 @@ class RootPackageLoaderTest extends \PHPUnit_Framework_TestCase
|
|||
$self = $this;
|
||||
|
||||
/* Can do away with this mock object when https://github.com/sebastianbergmann/phpunit-mock-objects/issues/81 is fixed */
|
||||
$processExecutor = new ProcessExecutorMock(function($command, &$output = null, $cwd = null) use ($self) {
|
||||
$processExecutor = new ProcessExecutorMock(function ($command, &$output = null, $cwd = null) use ($self) {
|
||||
if (0 === strpos($command, 'git rev-list')) {
|
||||
$output = "";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -207,9 +208,10 @@ class RootPackageLoaderTest extends \PHPUnit_Framework_TestCase
|
|||
$self = $this;
|
||||
|
||||
/* Can do away with this mock object when https://github.com/sebastianbergmann/phpunit-mock-objects/issues/81 is fixed */
|
||||
$processExecutor = new ProcessExecutorMock(function($command, &$output = null, $cwd = null) use ($self) {
|
||||
$processExecutor = new ProcessExecutorMock(function ($command, &$output = null, $cwd = null) use ($self) {
|
||||
if (0 === strpos($command, 'git rev-list')) {
|
||||
$output = "";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ class GitHubTest extends \PHPUnit_Framework_TestCase
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue