From 48774ee6cabe7dc2f31d6d0e6b937a57bc518f22 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 22 May 2011 09:30:59 +0200 Subject: [PATCH] Fix Literal id generation --- src/Composer/DependencyResolver/Literal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/DependencyResolver/Literal.php b/src/Composer/DependencyResolver/Literal.php index 03b7bba77..acbadec8c 100644 --- a/src/Composer/DependencyResolver/Literal.php +++ b/src/Composer/DependencyResolver/Literal.php @@ -44,12 +44,12 @@ class Literal public function getId() { - return (($this->wanted) ? 1 : -1) * spl_object_hash($this->package); + return ($this->wanted ? '' : '-') . spl_object_hash($this->package); } public function __toString() { - return ($this->isWanted() ? '+' : '-').$this->getPackage(); + return ($this->wanted ? '+' : '-') . $this->getPackage(); } public function inverted()