Skip to content

Commit 6bb9002

Browse files
committed
Fix arginfo for resourcebundle_create()
1 parent 13cef1a commit 6bb9002

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ext/intl/resourcebundle/resourcebundle.stub.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class ResourceBundle implements Traversable
44
{
55
public function __construct(?string $locale, ?string $bundlename, bool $fallback = true) {}
66

7-
/** @return ResourceBundle|false|null */
7+
/** @return ResourceBundle|null */
88
public static function create(?string $locale, ?string $bundlename, bool $fallback = true) {}
99

1010
/**
@@ -26,8 +26,7 @@ public function getErrorCode() {}
2626
public function getErrorMessage() {}
2727
}
2828

29-
/** @return ResourceBundle|false|null */
30-
function resourcebundle_create(?string $locale, ?string $bundlename, bool $fallback = true) {}
29+
function resourcebundle_create(?string $locale, ?string $bundlename, bool $fallback = true): ?ResourceBundle {}
3130

3231
/**
3332
* @param string|int $index

ext/intl/resourcebundle/resourcebundle_arginfo.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ ZEND_END_ARG_INFO()
2424

2525
#define arginfo_class_ResourceBundle_getErrorMessage arginfo_class_ResourceBundle_count
2626

27-
#define arginfo_resourcebundle_create arginfo_class_ResourceBundle___construct
27+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_resourcebundle_create, 0, 2, ResourceBundle, 1)
28+
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
29+
ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 1)
30+
ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0)
31+
ZEND_END_ARG_INFO()
2832

2933
ZEND_BEGIN_ARG_INFO_EX(arginfo_resourcebundle_get, 0, 0, 2)
3034
ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0)

0 commit comments

Comments
 (0)