mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-04 14:10:00 +09:00
Update to laravel 7
This commit is contained in:
@@ -41,8 +41,8 @@ class NumberComparator extends Comparator
|
||||
*/
|
||||
public function __construct(?string $test)
|
||||
{
|
||||
if (!preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) {
|
||||
throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test));
|
||||
if (null === $test || !preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) {
|
||||
throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null'));
|
||||
}
|
||||
|
||||
$target = $matches[2];
|
||||
@@ -73,7 +73,6 @@ class NumberComparator extends Comparator
|
||||
}
|
||||
}
|
||||
|
||||
$this->setTarget($target);
|
||||
$this->setOperator(isset($matches[1]) ? $matches[1] : '==');
|
||||
parent::__construct($target, $matches[1] ?: '==');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user