From e87431bc4c72dba93a90026ded42825f72429f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 14 Mar 2023 10:22:49 +0100 Subject: [PATCH] Fix return type of wrap method to resource|false instead of resource|bool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- src/CallbackWrapper.php | 2 +- src/CountWrapper.php | 2 +- src/DirectoryFilter.php | 2 +- src/HashWrapper.php | 2 +- src/IteratorDirectory.php | 2 +- src/WrapperHandler.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CallbackWrapper.php b/src/CallbackWrapper.php index 5d78b5a..bc5e435 100644 --- a/src/CallbackWrapper.php +++ b/src/CallbackWrapper.php @@ -58,7 +58,7 @@ class CallbackWrapper extends Wrapper { * @param callable|null $close (optional) * @param callable|null $readDir (optional) * @param callable|null $preClose (optional) - * @return resource|bool + * @return resource|false * */ public static function wrap($source, $read = null, $write = null, $close = null, $readDir = null, $preClose = null) { diff --git a/src/CountWrapper.php b/src/CountWrapper.php index b334620..d5aee9c 100644 --- a/src/CountWrapper.php +++ b/src/CountWrapper.php @@ -55,7 +55,7 @@ class CountWrapper extends Wrapper { * * @param resource $source * @param callable $callback - * @return resource|bool + * @return resource|false * * @throws \BadMethodCallException */ diff --git a/src/DirectoryFilter.php b/src/DirectoryFilter.php index 80b27e8..6a896c0 100644 --- a/src/DirectoryFilter.php +++ b/src/DirectoryFilter.php @@ -46,7 +46,7 @@ public function dir_readdir() { /** * @param resource $source * @param callable $filter - * @return resource|bool + * @return resource|false */ public static function wrap($source, callable $filter) { return self::wrapSource($source, [ diff --git a/src/HashWrapper.php b/src/HashWrapper.php index 616c2fe..5e01630 100644 --- a/src/HashWrapper.php +++ b/src/HashWrapper.php @@ -41,7 +41,7 @@ abstract class HashWrapper extends Wrapper { * @param resource $source * @param string $hash * @param callable $callback - * @return resource|bool + * @return resource|false * * @throws \BadMethodCallException */ diff --git a/src/IteratorDirectory.php b/src/IteratorDirectory.php index a3872dd..7c6bd51 100644 --- a/src/IteratorDirectory.php +++ b/src/IteratorDirectory.php @@ -92,7 +92,7 @@ public function dir_rewinddir() { * Creates a directory handle from the provided array or iterator * * @param \Iterator | array $source - * @return resource|bool + * @return resource|false * * @throws \BadMethodCallException */ diff --git a/src/WrapperHandler.php b/src/WrapperHandler.php index 258e3ec..be40880 100644 --- a/src/WrapperHandler.php +++ b/src/WrapperHandler.php @@ -55,7 +55,7 @@ private static function buildContext($protocol, $context, $source) { * @param resource|array $context * @param string|null $protocol deprecated, protocol is now automatically generated * @param string|null $class deprecated, class is now automatically generated - * @return bool|resource + * @return resource|false */ protected static function wrapSource($source, $context = [], $protocol = null, $class = null, $mode = 'r+') { if ($class === null) {