Skip to content

Commit b4cd695

Browse files
committed
Return no longer possible false return types
1 parent 3474911 commit b4cd695

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ext/phar/phar_object.stub.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ public function addFile(string $filename, ?string $localName = null): void {}
2222
public function addFromString(string $localName, string $contents): void {}
2323

2424
/** @tentative-return-type */
25-
public function buildFromDirectory(string $directory, string $pattern = ""): array|false {} // TODO Remove false?
25+
public function buildFromDirectory(string $directory, string $pattern = ""): array {}
2626

2727
/** @tentative-return-type */
28-
public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null): array|false {} // TODO Remove false?
28+
public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null): array {}
2929

3030
/** @tentative-return-type */
3131
public function compressFiles(int $compression): void {}
@@ -211,13 +211,13 @@ public function addFromString(string $localName, string $contents): void {}
211211
* @tentative-return-type
212212
* @implementation-alias Phar::buildFromDirectory
213213
*/
214-
public function buildFromDirectory(string $directory, string $pattern = ""): array|false {}
214+
public function buildFromDirectory(string $directory, string $pattern = ""): array {}
215215

216216
/**
217217
* @tentative-return-type
218218
* @implementation-alias Phar::buildFromIterator
219219
*/
220-
public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null): array|false {}
220+
public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null): array {}
221221

222222
/**
223223
* @tentative-return-type

ext/phar/phar_object_arginfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: f218205bde841a5f2cc2d81f0a4bc0e2594e8d5b */
2+
* Stub hash: fa11774e0b29ff4f711f1677b395545334e1aee9 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -24,12 +24,12 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Phar_addFromStri
2424
ZEND_ARG_TYPE_INFO(0, contents, IS_STRING, 0)
2525
ZEND_END_ARG_INFO()
2626

27-
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_Phar_buildFromDirectory, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
27+
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Phar_buildFromDirectory, 0, 1, IS_ARRAY, 0)
2828
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
2929
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"")
3030
ZEND_END_ARG_INFO()
3131

32-
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_Phar_buildFromIterator, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
32+
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Phar_buildFromIterator, 0, 1, IS_ARRAY, 0)
3333
ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0)
3434
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, baseDirectory, IS_STRING, 1, "null")
3535
ZEND_END_ARG_INFO()

0 commit comments

Comments
 (0)