diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index be56b23fb..760826d22 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -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 { diff --git a/src/Composer/DependencyResolver/Rule.php b/src/Composer/DependencyResolver/Rule.php index 1fe8cbd30..4760b8964 100644 --- a/src/Composer/DependencyResolver/Rule.php +++ b/src/Composer/DependencyResolver/Rule.php @@ -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() diff --git a/src/Composer/Util/Perforce.php b/src/Composer/Util/Perforce.php index cb5f2ee8c..c96bcb80b 100644 --- a/src/Composer/Util/Perforce.php +++ b/src/Composer/Util/Perforce.php @@ -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); diff --git a/tests/Composer/Test/Downloader/ArchiveDownloaderTest.php b/tests/Composer/Test/Downloader/ArchiveDownloaderTest.php index 39b53cf8f..68852d8e0 100644 --- a/tests/Composer/Test/Downloader/ArchiveDownloaderTest.php +++ b/tests/Composer/Test/Downloader/ArchiveDownloaderTest.php @@ -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();