Webmozart\Assert\Assert::__callStatic PHP Method

__callStatic() public static method

public static __callStatic ( $name, $arguments )
    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', $method), $arguments);
            }
            return;
        }
        if ('all' === substr($name, 0, 3)) {
            static::isTraversable($arguments[0]);
            $method = lcfirst(substr($name, 3));
            $args = $arguments;
            foreach ($arguments[0] as $entry) {
                $args[0] = $entry;
                call_user_func_array(array('static', $method), $args);
            }
            return;
        }
        throw new BadMethodCallException('No such method: ' . $name);
    }