<?php

namespace Symfony\Component\Form;

/**
 * @template T of FormError|FormErrorIterator
 * @implements \ArrayAccess<int, T>
 * @implements \RecursiveIterator<int, T>
 * @implements \SeekableIterator<int, T>
 */
class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \ArrayAccess, \Countable
{
    /**
     * @param T[]
     */
    public function __construct(FormInterface $form, array $errors);

    /** @return T */
    public function current();

    /**
     * @param int $position
     *
     * @return T
     */
    public function offsetGet($position);
}
