protected function checkType(ExpressionContract $expression)
    {
        if (!$expression instanceof ConstraintContract) {
            throw new InvalidArgumentException("ConstraintGroup works only with Constraint not " . Type::of($expression));
        }

        return $expression;
    }
protected function checkType(ExpressionContract $expression)
    {
        if (!$expression instanceof ConstraintContract) {
            throw new InvalidArgumentException("ConstraintGroup works only with Constraint not " . Type::of($expression));
        }

        return $expression;
    }
protected function checkType ( ExpressionContract $ expression ) { if ( ! $ expression instanceof ConstraintContract ) { throw new InvalidArgumentException ( "ConstraintGroup works only with Constraint not " . Type :: of ( $ expression ) ) ; } return $ expression ; }
Throws an error if the expression is not a constraint.

@param ExpressionContract $expression

@return ConstraintContract
Throws an error if the expression is not a constraint .