Skip to content

Commit 5afca8f

Browse files
committed
Name constructor argument "sources" instead of generic "args"
1 parent 9b5797b commit 5afca8f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/main/php/io/streams/SequenceInputStream.class.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ class SequenceInputStream implements InputStream {
1313
/**
1414
* Creates a new instance
1515
*
16-
* @param iterable|io.streams.InputStream... $args
16+
* @param iterable|io.streams.InputStream... $sources
1717
* @throws lang.IllegalArgumentException if streams are empty
1818
*/
19-
public function __construct(... $args) {
20-
$this->streams= $this->iterator($args);
19+
public function __construct(... $sources) {
20+
$this->streams= $this->iterator($sources);
2121
if (!$this->streams->valid()) {
2222
throw new IllegalArgumentException('Streams may not be empty');
2323
}
@@ -26,12 +26,12 @@ public function __construct(... $args) {
2626
}
2727

2828
/** Creates an iterator from the given arguments */
29-
private function iterator($args) {
30-
foreach ($args as $arg) {
31-
if ($arg instanceof InputStream) {
32-
yield $arg;
29+
private function iterator($sources) {
30+
foreach ($sources as $source) {
31+
if ($source instanceof InputStream) {
32+
yield $source;
3333
} else {
34-
yield from $arg;
34+
yield from $source;
3535
}
3636
}
3737
}

0 commit comments

Comments
 (0)