Skip to content

Commit 6bacc79

Browse files
committed
Add generic types to traversable implementations
1 parent b076aa9 commit 6bacc79

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

InputStream.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* Provides a way to continuously write to the input of a Process until the InputStream is closed.
1818
*
1919
* @author Nicolas Grekas <p@tchwork.com>
20+
*
21+
* @implements \IteratorAggregate<int, string>
2022
*/
2123
class InputStream implements \IteratorAggregate
2224
{
@@ -67,7 +69,7 @@ public function isClosed()
6769
}
6870

6971
/**
70-
* @return \Traversable
72+
* @return \Traversable<int, string>
7173
*/
7274
#[\ReturnTypeWillChange]
7375
public function getIterator()

Process.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
*
2828
* @author Fabien Potencier <fabien@symfony.com>
2929
* @author Romain Neutron <imprec@gmail.com>
30+
*
31+
* @implements \IteratorAggregate<string, string>
3032
*/
3133
class Process implements \IteratorAggregate
3234
{
@@ -618,7 +620,7 @@ public function getIncrementalOutput()
618620
* @throws LogicException in case the output has been disabled
619621
* @throws LogicException In case the process is not started
620622
*
621-
* @return \Generator
623+
* @return \Generator<string, string>
622624
*/
623625
#[\ReturnTypeWillChange]
624626
public function getIterator(int $flags = 0)

0 commit comments

Comments
 (0)