Cleanup old Composer dependencies
This commit is contained in:
15
vendor/symfony/finder/Comparator/Comparator.php
vendored
15
vendor/symfony/finder/Comparator/Comparator.php
vendored
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user