1
0
mirror of https://github.com/danog/byte-stream.git synced 2024-11-30 04:19:23 +01:00

Make InMemoryStream, IteratorStream and methods of Message final

This commit is contained in:
Niklas Keller 2017-05-22 14:37:20 +02:00
parent 7616029740
commit c33c2bec61
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ use Amp\Success;
/**
* Input stream with a single already known data chunk.
*/
class InMemoryStream implements InputStream {
final class InMemoryStream implements InputStream {
private $contents;
/**

View File

@ -7,7 +7,7 @@ use Amp\Failure;
use Amp\Iterator;
use Amp\Promise;
class IteratorStream implements InputStream {
final class IteratorStream implements InputStream {
private $iterator;
private $exception;

View File

@ -84,7 +84,7 @@ class Message implements InputStream, Promise {
return $this->buffer;
}
public function read(): Promise {
final public function read(): Promise {
if ($this->pendingRead) {
throw new PendingReadError;
}
@ -117,7 +117,7 @@ class Message implements InputStream, Promise {
/**
* {@inheritdoc}
*/
public function onResolve(callable $onResolved) {
final public function onResolve(callable $onResolved) {
$this->buffering = true;
if ($this->coroutine === null) {
@ -141,7 +141,7 @@ class Message implements InputStream, Promise {
*
* @return InputStream
*/
public function getInputStream(): InputStream {
final public function getInputStream(): InputStream {
return $this->source;
}
}