Skip to content

Commit a8cf905

Browse files
committed
[Stream] Rename (ReadableStream|WritableStream){ => Interface}
For the record, I disagree with this. But I will cry in my corner for this one.
1 parent 7a08a27 commit a8cf905

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

Buffer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
use Evenement\EventEmitter;
66
use React\EventLoop\LoopInterface;
7-
use React\Stream\WritableStream;
7+
use React\Stream\WritableStreamInterface;
88

9-
class Buffer extends EventEmitter implements WritableStream
9+
class Buffer extends EventEmitter implements WritableStreamInterface
1010
{
1111
public $stream;
1212
public $listening = false;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
use Evenement\EventEmitterInterface;
66

77
// Events: data, end, error, close
8-
interface ReadableStream extends EventEmitterInterface
8+
interface ReadableStreamInterface extends EventEmitterInterface
99
{
1010
public function isReadable();
1111
public function pause();
1212
public function resume();
1313
public function close();
14-
public function pipe(WritableStream $dest, array $options = array());
14+
public function pipe(WritableStreamInterface $dest, array $options = array());
1515
}

Stream.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Evenement\EventEmitter;
66
use React\EventLoop\LoopInterface;
77

8-
class Stream extends EventEmitter implements ReadableStream, WritableStream
8+
class Stream extends EventEmitter implements ReadableStreamInterface, WritableStreamInterface
99
{
1010
public $bufferSize = 4096;
1111
public $stream;
@@ -104,7 +104,7 @@ public function end($data = null)
104104
$this->buffer->end($data);
105105
}
106106

107-
public function pipe(WritableStream $dest, array $options = array())
107+
public function pipe(WritableStreamInterface $dest, array $options = array())
108108
{
109109
Util::pipe($this, $dest, $options);
110110

Util.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class Util
88
{
9-
public static function pipe(ReadableStream $source, WritableStream $dest, array $options = array())
9+
public static function pipe(ReadableStreamInterface $source, WritableStreamInterface $dest, array $options = array())
1010
{
1111
// TODO: use stream_copy_to_stream
1212
// it is 4x faster than this
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Evenement\EventEmitterInterface;
66

77
// Events: drain, error, close, pipe
8-
interface WritableStream extends EventEmitterInterface
8+
interface WritableStreamInterface extends EventEmitterInterface
99
{
1010
public function isWritable();
1111
public function write($data);

0 commit comments

Comments
 (0)