Skip to content

Commit 2083142

Browse files
authored
Expand FormView key to include int
1 parent 20dbf63 commit 2083142

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

FormView.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
/**
1717
* @author Bernhard Schussek <[email protected]>
1818
*
19-
* @implements \ArrayAccess<string, FormView>
20-
* @implements \IteratorAggregate<string, FormView>
19+
* @implements \ArrayAccess<int|string, FormView>
20+
* @implements \IteratorAggregate<int|string, FormView>
2121
*/
2222
class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
2323
{
@@ -37,7 +37,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
3737
/**
3838
* The child views.
3939
*
40-
* @var array<string, FormView>
40+
* @var array<int|string, FormView>
4141
*/
4242
public $children = [];
4343

@@ -107,7 +107,7 @@ public function setMethodRendered()
107107
/**
108108
* Returns a child by name (implements \ArrayAccess).
109109
*
110-
* @param string $name The child name
110+
* @param int|string $name The child name
111111
*
112112
* @return self
113113
*/
@@ -120,7 +120,7 @@ public function offsetGet($name)
120120
/**
121121
* Returns whether the given child exists (implements \ArrayAccess).
122122
*
123-
* @param string $name The child name
123+
* @param int|string $name The child name
124124
*
125125
* @return bool
126126
*/
@@ -146,7 +146,7 @@ public function offsetSet($name, $value)
146146
/**
147147
* Removes a child (implements \ArrayAccess).
148148
*
149-
* @param string $name The child name
149+
* @param int|string $name The child name
150150
*
151151
* @return void
152152
*/
@@ -159,7 +159,7 @@ public function offsetUnset($name)
159159
/**
160160
* Returns an iterator to iterate over children (implements \IteratorAggregate).
161161
*
162-
* @return \ArrayIterator<string, FormView>
162+
* @return \ArrayIterator<int|string, FormView>
163163
*/
164164
#[\ReturnTypeWillChange]
165165
public function getIterator()

0 commit comments

Comments
 (0)