File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments