1
0
Fork 0

Use combined assignment operators

pull/7629/head
Gabriel Caruso 2018-09-07 22:35:35 -03:00 committed by Jordi Boggiano
parent a17f051e29
commit 71c8735e11
4 changed files with 6 additions and 6 deletions

View File

@ -204,7 +204,7 @@ EOT
$name = get_current_user() . '/' . $name;
} else {
// package names must be in the format foo/bar
$name = $name . '/' . $name;
$name .= '/' . $name;
}
$name = strtolower($name);
} else {

View File

@ -111,7 +111,7 @@ abstract class Rule
public function enable()
{
$this->bitfield = $this->bitfield & ~(255 << self::BITFIELD_DISABLED);
$this->bitfield &= ~(255 << self::BITFIELD_DISABLED);
}
public function isDisabled()

View File

@ -269,9 +269,9 @@ class Perforce
public function generateP4Command($command, $useClient = true)
{
$p4Command = 'p4 ';
$p4Command = $p4Command . '-u ' . $this->getUser() . ' ';
$p4Command .= '-u ' . $this->getUser() . ' ';
if ($useClient) {
$p4Command = $p4Command . '-c ' . $this->getClient() . ' ';
$p4Command .= '-c ' . $this->getClient() . ' ';
}
$p4Command = $p4Command . '-p ' . $this->getPort() . ' ' . $command;
@ -312,7 +312,7 @@ class Perforce
chdir($this->path);
$p4SyncCommand = $this->generateP4Command('sync -f ');
if (null !== $sourceReference) {
$p4SyncCommand = $p4SyncCommand . '@' . $sourceReference;
$p4SyncCommand .= '@' . $sourceReference;
}
$this->executeCommand($p4SyncCommand);
chdir($prevDir);

View File

@ -131,7 +131,7 @@ class ArchiveDownloaderTest extends TestCase
$method = new \ReflectionMethod($downloader, 'processUrl');
$method->setAccessible(true);
$url = $url . '.' . $extension;
$url .= '.' . $extension;
$expected = 'https://bitbucket.org/davereid/drush-virtualhost/get/ref.' . $extension;
$package = $this->getMockBuilder('Composer\Package\PackageInterface')->getMock();