File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
- <?php
2
-
3
- declare (strict_types=1 );
1
+ <?php declare (strict_types=1 );
4
2
5
3
namespace ReactParallel \Streams ;
6
4
@@ -18,13 +16,13 @@ public function __construct(EventLoopBridge $loop)
18
16
$ this ->loop = $ loop ;
19
17
}
20
18
21
- public function stream (Channel $ channel ): Observable
19
+ public function channel (Channel $ channel ): Observable
22
20
{
23
21
return $ this ->loop ->observe ($ channel );
24
22
}
25
23
26
24
public function single (Channel $ channel ): PromiseInterface
27
25
{
28
- return $ this ->loop -> observe ($ channel )->take (1 )->toPromise ();
26
+ return $ this ->channel ($ channel )->take (1 )->toPromise ();
29
27
}
30
28
}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function recv(): void
47
47
48
48
$ promises = [];
49
49
foreach ($ channels as $ channel ) {
50
- $ promises [] = $ recvObservable ->stream ($ channel )->toArray ()->toPromise ();
50
+ $ promises [] = $ recvObservable ->channel ($ channel )->toArray ()->toPromise ();
51
51
}
52
52
53
53
$ rd = $ this ->await (all ($ promises ), $ loop , 3.3 );
You can’t perform that action at this time.
0 commit comments