Cleanup old Composer dependencies

This commit is contained in:
Frédéric Guillot
2020-10-04 14:25:16 -07:00
parent 8322876d8e
commit b7c200373a
72 changed files with 453 additions and 3111 deletions

View File

@@ -31,12 +31,7 @@ class Comparator
return $this->target;
}
/**
* Sets the target value.
*
* @param string $target The target value
*/
public function setTarget($target)
public function setTarget(string $target)
{
$this->target = $target;
}
@@ -54,17 +49,15 @@ class Comparator
/**
* Sets the comparison operator.
*
* @param string $operator A valid operator
*
* @throws \InvalidArgumentException
*/
public function setOperator($operator)
public function setOperator(string $operator)
{
if (!$operator) {
if ('' === $operator) {
$operator = '==';
}
if (!in_array($operator, array('>', '<', '>=', '<=', '==', '!='))) {
if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) {
throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator));
}