Skip to content

Commit

Permalink
Merge pull request #17 from come-nc/fix/fix-wrap-typing
Browse files Browse the repository at this point in the history
Fix return type of wrap method to resource|false instead of resource|bool
  • Loading branch information
icewind1991 authored Mar 16, 2023
2 parents dd2d2ce + e87431b commit 64200fd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/CallbackWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/CountWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CountWrapper extends Wrapper {
*
* @param resource $source
* @param callable $callback
* @return resource|bool
* @return resource|false
*
* @throws \BadMethodCallException
*/
Expand Down
2 changes: 1 addition & 1 deletion src/DirectoryFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, [
Expand Down
2 changes: 1 addition & 1 deletion src/HashWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/IteratorDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/WrapperHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 64200fd

Please sign in to comment.