CS fixes
parent
9a806658d6
commit
11a0d16ccc
|
@ -317,6 +317,7 @@ EOF;
|
|||
|
||||
return array(
|
||||
$filesCode);
|
||||
|
||||
EOF;
|
||||
}
|
||||
|
||||
|
|
|
@ -377,6 +377,7 @@ class Pool
|
|||
if ($constraint === null) {
|
||||
return self::MATCH;
|
||||
}
|
||||
|
||||
return $constraint->matches(new VersionConstraint('==', $candidateVersion)) ? self::MATCH : self::MATCH_NAME;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
namespace Composer\Downloader;
|
||||
|
||||
use Composer\Package\PackageInterface;
|
||||
|
@ -75,16 +74,17 @@ class PerforceDownloader extends VcsDownloader
|
|||
public function getLocalChanges(PackageInterface $package, $path)
|
||||
{
|
||||
$this->io->write('Perforce driver does not check for local changes before overriding', true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getCommitLogs($fromReference, $toReference, $path)
|
||||
{
|
||||
$commitLogs = $this->perforce->getCommitLogs($fromReference, $toReference);
|
||||
|
||||
return $commitLogs;
|
||||
}
|
||||
|
||||
|
|
|
@ -539,7 +539,6 @@ class Installer
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Workaround: if your packages depend on plugins, we must be sure
|
||||
* that those are installed / updated first; else it would lead to packages
|
||||
|
|
|
@ -165,6 +165,7 @@ class LibraryInstaller implements InstallerInterface
|
|||
if (strpos($initialDownloadPath, $targetDownloadPath) === 0) {
|
||||
$this->removeCode($initial);
|
||||
$this->installCode($target);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ class PlatformRepository extends ArrayRepository
|
|||
$version = $versionParser->normalize($prettyVersion);
|
||||
}
|
||||
|
||||
|
||||
$php = new CompletePackage('php', $version, $prettyVersion);
|
||||
$php->setDescription('The PHP interpreter');
|
||||
parent::addPackage($php);
|
||||
|
|
|
@ -10,12 +10,10 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
namespace Composer\Repository\Vcs;
|
||||
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Util\ProcessExecutor;
|
||||
use Composer\Util\Filesystem;
|
||||
use Composer\Util\Perforce;
|
||||
|
||||
/**
|
||||
|
@ -145,6 +143,7 @@ class PerforceDriver extends VcsDriver
|
|||
if (isset($this->composerInfo)) {
|
||||
$result = count($this->composerInfo) > 0;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
|
@ -9,7 +10,6 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
namespace Composer\Util;
|
||||
|
||||
use Composer\IO\IOInterface;
|
||||
|
@ -20,7 +20,6 @@ use Symfony\Component\Process\Process;
|
|||
*/
|
||||
class Perforce
|
||||
{
|
||||
|
||||
protected $path;
|
||||
protected $p4Depot;
|
||||
protected $p4Client;
|
||||
|
@ -35,7 +34,6 @@ class Perforce
|
|||
protected $uniquePerforceClientName;
|
||||
protected $windowsFlag;
|
||||
|
||||
|
||||
public static function createPerforce($repoConfig, $port, $path, ProcessExecutor $process = null)
|
||||
{
|
||||
if (!isset($process)) {
|
||||
|
@ -44,6 +42,7 @@ class Perforce
|
|||
$isWindows = defined('PHP_WINDOWS_VERSION_BUILD');
|
||||
|
||||
$perforce = new Perforce($repoConfig, $port, $path, $process, $isWindows);
|
||||
|
||||
return $perforce;
|
||||
}
|
||||
|
||||
|
@ -161,6 +160,7 @@ class Perforce
|
|||
$this->p4Stream = '//' . $this->p4Depot;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->p4Stream;
|
||||
}
|
||||
|
||||
|
@ -268,6 +268,7 @@ class Perforce
|
|||
if ($index === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -329,7 +330,6 @@ class Perforce
|
|||
fclose($spec);
|
||||
}
|
||||
|
||||
|
||||
protected function read($pipe, $name)
|
||||
{
|
||||
if (feof($pipe)) {
|
||||
|
@ -347,10 +347,10 @@ class Perforce
|
|||
{
|
||||
$command = $this->generateP4Command(' login -a');
|
||||
$process = new Process($command, null, null, $password);
|
||||
|
||||
return $process->run();
|
||||
}
|
||||
|
||||
|
||||
public function p4Login(IOInterface $io)
|
||||
{
|
||||
$this->queryP4User($io);
|
||||
|
@ -369,6 +369,7 @@ class Perforce
|
|||
{
|
||||
$result = '';
|
||||
$processExecutor->execute('p4 -p ' . $url . ' info -s', $result);
|
||||
|
||||
return false === strpos($result, 'error');
|
||||
}
|
||||
|
||||
|
@ -380,6 +381,7 @@ class Perforce
|
|||
|
||||
return $this->getComposerInformationFromPath($composerJson);
|
||||
}
|
||||
|
||||
return $this->getComposerInformationFromLabel($identifier, $index);
|
||||
}
|
||||
|
||||
|
@ -496,6 +498,7 @@ class Perforce
|
|||
}
|
||||
$fields = explode(' ', $changes);
|
||||
$changeList = $fields[1];
|
||||
|
||||
return $changeList;
|
||||
}
|
||||
|
||||
|
@ -513,6 +516,7 @@ class Perforce
|
|||
$main = substr($fromReference, 0, $index) . '/...';
|
||||
$command = $this->generateP4Command('filelog ' . $main . '@' . $fromChangeList. ',' . $toChangeList);
|
||||
$result = $this->executeCommand($command);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
|
@ -9,7 +10,6 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
namespace Composer\Test\Downloader;
|
||||
|
||||
use Composer\Downloader\PerforceDownloader;
|
||||
|
@ -41,7 +41,6 @@ class PerforceDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
$this->io = $this->getMock('Composer\IO\IOInterface');
|
||||
}
|
||||
|
||||
|
||||
public function testDoDownloadGetRepoConfig()
|
||||
{
|
||||
$downloader = new PerforceDownloader($this->io, $this->config);
|
||||
|
|
|
@ -17,7 +17,6 @@ use Composer\Config;
|
|||
use Composer\Installer\PluginInstaller;
|
||||
use Composer\Package\Loader\JsonLoader;
|
||||
use Composer\Package\Loader\ArrayLoader;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Plugin\PluginManager;
|
||||
use Composer\Autoload\AutoloadGenerator;
|
||||
use Composer\Util\Filesystem;
|
||||
|
@ -166,4 +165,3 @@ class PluginInstallerTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals('installer-v3', $plugins[1]->version);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
|
@ -11,7 +12,6 @@
|
|||
|
||||
namespace Composer\Test\Repository\Vcs;
|
||||
|
||||
|
||||
use Composer\Repository\Vcs\PerforceDriver;
|
||||
use Composer\Util\Filesystem;
|
||||
use Composer\Config;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
|
@ -9,7 +10,6 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
namespace Composer\Test\Util;
|
||||
|
||||
use Composer\Util\Perforce;
|
||||
|
@ -70,7 +70,6 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals('//depot/branch', $stream);
|
||||
}
|
||||
|
||||
|
||||
public function testGetStreamWithoutLabelWithStreamWithoutLabel()
|
||||
{
|
||||
$stream = $this->perforce->getStreamWithoutLabel('//depot/branch');
|
||||
|
@ -123,6 +122,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = 'P4USER=TEST_P4VARIABLE_USER' . PHP_EOL ;
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -146,6 +146,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = 'TEST_P4VARIABLE_USER' . PHP_EOL;
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -237,6 +238,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = 'P4PASSWD=TEST_P4VARIABLE_PASSWORD' . PHP_EOL;
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -260,6 +262,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = 'TEST_P4VARIABLE_PASSWORD' . PHP_EOL;
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -357,6 +360,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = 'Stream //depot/branch mainline none \'branch\'' . PHP_EOL;
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -382,6 +386,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = 'Label 0.0.1 2013/07/31 \'First Label!\'' . PHP_EOL . 'Label 0.0.2 2013/08/01 \'Second Label!\'' . PHP_EOL;
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -404,6 +409,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = 'Label 0.0.1 2013/07/31 \'First Label!\'' . PHP_EOL . 'Label 0.0.2 2013/08/01 \'Second Label!\'' . PHP_EOL;
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -428,6 +434,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = 'Depot depot 2013/06/25 stream /p4/1/depots/depot/... \'Created by Me\'';
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -447,6 +454,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = PerforceTest::getComposerJson();
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -472,6 +480,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = '//depot/composer.json#1 - branch change 10001 (text)';
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -485,6 +494,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = PerforceTest::getComposerJson();
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -513,6 +523,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = PerforceTest::getComposerJson();
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -540,6 +551,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = '//depot/composer.json#1 - branch change 10001 (text)';
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
@ -553,6 +565,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->returnCallback(
|
||||
function ($command, &$output) {
|
||||
$output = PerforceTest::getComposerJson();
|
||||
|
||||
return true;
|
||||
}
|
||||
)
|
||||
|
|
|
@ -144,7 +144,6 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public function testCaptureAuthenticationParamsFromUrl()
|
||||
{
|
||||
$io = $this->getMock('Composer\IO\IOInterface');
|
||||
|
|
Loading…
Reference in New Issue