function Assert::__callStatic
Throws
BadMethodCallException
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 1966
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function __callStatic($name, $arguments) {
if ('nullOr' === \substr($name, 0, 6)) {
if (null !== $arguments[0]) {
$method = \lcfirst(\substr($name, 6));
\call_user_func_array(array(
static::class,
$method,
), $arguments);
}
return;
}
if ('all' === \substr($name, 0, 3)) {
static::isIterable($arguments[0]);
$method = \lcfirst(\substr($name, 3));
$args = $arguments;
foreach ($arguments[0] as $entry) {
$args[0] = $entry;
\call_user_func_array(array(
static::class,
$method,
), $args);
}
return;
}
throw new BadMethodCallException('No such method: ' . $name);
}