composer update

This commit is contained in:
2020-05-10 09:29:56 +00:00
parent c6f807ebad
commit 8e93eececf
919 changed files with 11790 additions and 7005 deletions
+6 -4
View File
@@ -50,7 +50,6 @@ class Validator
'is missing'
);
}
}
/**
@@ -133,6 +132,10 @@ class Validator
{
return $this->assertCallback(
function ($value) use ($choices) {
if ($value === null) {
return true;
}
return in_array($value, $choices, true);
},
sprintf('is not one of [%s]', implode(', ', $choices))
@@ -151,15 +154,14 @@ class Validator
public function allowedRegexValues($regex)
{
return $this->assertCallback(
function ($value) use ($regex)
{
function ($value) use ($regex) {
if ($value === null) {
return true;
}
return Regex::match($regex, $value)->success()->getOrElse(0) === 1;
},
sprintf('does not match "%s"' , $regex)
sprintf('does not match "%s"', $regex)
);
}