Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return type of wrap method to resource|false instead of resource|bool #17

Merged
merged 1 commit into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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