Skip to content

Commit 3a50b51

Browse files
committed
create FormErrorIterator stub
1 parent 8ef80f5 commit 3a50b51

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

extension.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ parameters:
2626
- stubs/Symfony/Component/EventDispatcher/GenericEvent.stub
2727
- stubs/Symfony/Component/Form/DataTransformerInterface.stub
2828
- stubs/Symfony/Component/Form/FormBuilderInterface.stub
29+
- stubs/Symfony/Component/Form/FormError.stub
30+
- stubs/Symfony/Component/Form/FormErrorIterator.stub
2931
- stubs/Symfony/Component/Form/FormInterface.stub
3032
- stubs/Symfony/Component/Form/FormTypeExtensionInterface.stub
3133
- stubs/Symfony/Component/Form/FormTypeInterface.stub
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Symfony\Component\Form;
4+
5+
class FormError
6+
{
7+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace Symfony\Component\Form;
4+
5+
/**
6+
* @template T of FormError|FormErrorIterator
7+
* @phpstan-implements \ArrayAccess<int, T>
8+
* @phpstan-implements \RecursiveIterator<int, T>
9+
* @phpstan-implements \SeekableIterator<int, T>
10+
*/
11+
class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \ArrayAccess, \Countable
12+
{
13+
/**
14+
* @param array<T> $errors
15+
*/
16+
public function __construct(FormInterface $form, array $errors);
17+
18+
/** @return T */
19+
public function current();
20+
21+
/**
22+
* @param mixed $position
23+
*
24+
* @return T
25+
*/
26+
public function offsetGet($position);
27+
}

0 commit comments

Comments
 (0)