mirror of
https://codeberg.org/icewind/streams.git
synced 2026-06-03 16:44:07 +02:00
Fix return type of wrap method to resource|false instead of resource|bool
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
dd2d2cec9c
commit
e87431bc4c
6 changed files with 6 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class CountWrapper extends Wrapper {
|
|||
*
|
||||
* @param resource $source
|
||||
* @param callable $callback
|
||||
* @return resource|bool
|
||||
* @return resource|false
|
||||
*
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class DirectoryFilter extends DirectoryWrapper {
|
|||
/**
|
||||
* @param resource $source
|
||||
* @param callable $filter
|
||||
* @return resource|bool
|
||||
* @return resource|false
|
||||
*/
|
||||
public static function wrap($source, callable $filter) {
|
||||
return self::wrapSource($source, [
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class IteratorDirectory extends WrapperHandler implements Directory {
|
|||
* Creates a directory handle from the provided array or iterator
|
||||
*
|
||||
* @param \Iterator | array $source
|
||||
* @return resource|bool
|
||||
* @return resource|false
|
||||
*
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class WrapperHandler {
|
|||
* @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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue