aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2017-11-10 10:18:43 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2017-11-10 10:18:43 +0100
commit38791b9d4eeb5e88b7cd0a28be074fa94f34af7b (patch)
treeceb64246bd3a37bf41d98a30a95c839a5ab719b3
parent0d3ee182be0210824057dc29b8656596b190f9b6 (diff)
downloadStream-38791b9d4eeb5e88b7cd0a28be074fa94f34af7b.zip
Stream-38791b9d4eeb5e88b7cd0a28be074fa94f34af7b.tar.gz
Stream-38791b9d4eeb5e88b7cd0a28be074fa94f34af7b.tar.bz2
chore(php) Fix a type error.
-rw-r--r--Source/Stream.php2
-rw-r--r--Test/Unit/Stream.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/Stream.php b/Source/Stream.php
index da686d1..0c0a01e 100644
--- a/Source/Stream.php
+++ b/Source/Stream.php
@@ -408,7 +408,7 @@ abstract class Stream implements IStream\Stream, Event\Listenable
*/
public function setStreamBlocking(bool $mode): bool
{
- return stream_set_blocking($this->getStream(), (int) $mode);
+ return stream_set_blocking($this->getStream(), $mode);
}
/**
diff --git a/Test/Unit/Stream.php b/Test/Unit/Stream.php
index be9e7f7..627b5bf 100644
--- a/Test/Unit/Stream.php
+++ b/Test/Unit/Stream.php
@@ -511,14 +511,14 @@ class Stream extends Test\Unit\Suite
->given(
$stream = new SUT(__FILE__),
- $this->function->stream_set_blocking = function ($_stream, $_mode) use ($self, $stream, &$called) {
+ $this->function->stream_set_blocking = function ($_stream, bool $_mode) use ($self, $stream, &$called) {
$called = true;
$self
->resource($_stream)
->isIdenticalTo($stream->getStream())
- ->integer($_mode)
- ->isEqualTo(1);
+ ->boolean($_mode)
+ ->isTrue();
return true;
}