Pinq\Expressions\Expression::verifyAll PHP Method

verifyAll() final protected static method

Verifies the supplied array only contains expressions of the supplied type.
final protected static verifyAll ( array $expressions, string $type = __CLASS__ ) : Expression[]
$expressions array
$type string
return Expression[]
    protected static final function verifyAll(array $expressions, $type = __CLASS__)
    {
        foreach ($expressions as $key => $expression) {
            if (!$expression instanceof $type) {
                throw new PinqException('Invalid array of expressions: invalid expression of type %s at index %s, expecting %s', Utilities::getTypeOrClass($expression), $key, $type);
            }
        }
        return $expressions;
    }