Skip to content

Commit d549272

Browse files
authored
Merge pull request #6 from reactphp-parallel/rename-stream-to-channel
Rename stream to channel
2 parents fc5acfc + 0e46ede commit d549272

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Factory.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php
2-
3-
declare(strict_types=1);
1+
<?php declare(strict_types=1);
42

53
namespace ReactParallel\Streams;
64

@@ -18,13 +16,13 @@ public function __construct(EventLoopBridge $loop)
1816
$this->loop = $loop;
1917
}
2018

21-
public function stream(Channel $channel): Observable
19+
public function channel(Channel $channel): Observable
2220
{
2321
return $this->loop->observe($channel);
2422
}
2523

2624
public function single(Channel $channel): PromiseInterface
2725
{
28-
return $this->loop->observe($channel)->take(1)->toPromise();
26+
return $this->channel($channel)->take(1)->toPromise();
2927
}
3028
}

tests/SingleRecvObservableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function recv(): void
4747

4848
$promises = [];
4949
foreach ($channels as $channel) {
50-
$promises[] = $recvObservable->stream($channel)->toArray()->toPromise();
50+
$promises[] = $recvObservable->channel($channel)->toArray()->toPromise();
5151
}
5252

5353
$rd = $this->await(all($promises), $loop, 3.3);

0 commit comments

Comments
 (0)