Symfony\Component\Validator\ConstraintViolationList::get PHP Method

get() public method

Returns the violation at a given offset.
public get ( integer $offset ) : ConstraintViolation
$offset integer The offset of the violation.
return ConstraintViolation The violation.
    public function get($offset)
    {
        if (!isset($this->violations[$offset])) {
            throw new \OutOfBoundsException(sprintf('The offset "%s" does not exist.', $offset));
        }

        return $this->violations[$offset];
    }