updated core and modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-09-09 16:27:51 +02:00
parent 027aa99b32
commit 41863f872c
7810 changed files with 318922 additions and 83631 deletions
+41 -3
View File
@@ -14,7 +14,7 @@ namespace Composer\Semver\Constraint;
/**
* Defines a constraint.
*/
class Constraint extends AbstractConstraint
class Constraint implements ConstraintInterface
{
/* operator integer values */
const OP_EQ = 0;
@@ -55,10 +55,48 @@ class Constraint extends AbstractConstraint
);
/** @var string */
private $operator;
protected $operator;
/** @var string */
private $version;
protected $version;
/** @var string */
protected $prettyString;
/**
* @param ConstraintInterface $provider
*
* @return bool
*/
public function matches(ConstraintInterface $provider)
{
if ($provider instanceof $this) {
return $this->matchSpecific($provider);
}
// turn matching around to find a match
return $provider->matches($this);
}
/**
* @param string $prettyString
*/
public function setPrettyString($prettyString)
{
$this->prettyString = $prettyString;
}
/**
* @return string
*/
public function getPrettyString()
{
if ($this->prettyString) {
return $this->prettyString;
}
return $this->__toString();
}
/**
* Get all supported comparison operators.