Assert\LazyAssertionException::fromErrors PHP Method

fromErrors() public static method

public static fromErrors ( array $errors ) : self
$errors array
return self
    public static function fromErrors(array $errors)
    {
        $message = sprintf('The following %d assertions failed:', count($errors)) . "\n";
        $i = 1;
        foreach ($errors as $error) {
            $message .= sprintf("%d) %s: %s\n", $i++, $error->getPropertyPath(), $error->getMessage());
        }
        return new static($message, $errors);
    }