Skip to content

Commit 2f266fc

Browse files
committed
Fix code review comments
1 parent 2f0ca16 commit 2f266fc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

ext/intl/calendar/calendar.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ private function __construct() {}
66

77
/**
88
* @param IntlTimeZone|DateTimeZone|string|null $timeZone
9-
* @return IntlGregorianCalendar|null
9+
* @return IntlCalendar|null
1010
*/
1111
public static function createInstance($timeZone = null, ?string $locale = null) {}
1212

@@ -175,7 +175,7 @@ public function isLeapYear(int $year) {}
175175
/** @param IntlTimeZone|DateTimeZone|string|null $timeZone */
176176
function intlcal_create_instance($timeZone = null, ?string $locale = null): IntlCalendar|null {}
177177

178-
function intlcal_get_keyword_values_for_locale(string $key, string $locale, bool $commonlyUsed): Iterator|false {}
178+
function intlcal_get_keyword_values_for_locale(string $key, string $locale, bool $commonlyUsed): IntlIterator|false {}
179179

180180
function intlcal_get_now(): float {}
181181

ext/intl/calendar/calendar_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, In
160160
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
161161
ZEND_END_ARG_INFO()
162162

163-
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intlcal_get_keyword_values_for_locale, 0, 3, Iterator, MAY_BE_FALSE)
163+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intlcal_get_keyword_values_for_locale, 0, 3, IntlIterator, MAY_BE_FALSE)
164164
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
165165
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
166166
ZEND_ARG_TYPE_INFO(0, commonlyUsed, _IS_BOOL, 0)

ext/intl/calendar/calendar_methods.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set)
415415
co->ucal->set((int32_t)args[0], (int32_t)args[1], (int32_t)args[2]);
416416
} else if (arg_num == 4) {
417417
zend_argument_count_error("No variant with 4 arguments");
418-
return;
418+
RETURN_THROWS();
419419
} else if (arg_num == 5) {
420420
co->ucal->set((int32_t)args[0], (int32_t)args[1], (int32_t)args[2], (int32_t)args[3], (int32_t)args[4]);
421421
} else {

ext/intl/calendar/gregoriancalendar_methods.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ static void _php_intlgregcal_constructor_body(
6060
if (ZEND_NUM_ARGS() > 6 ||
6161
zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
6262
zend_argument_count_error("Too many arguments");
63-
return;
63+
RETURN_THROWS();
6464
}
6565

6666
for (variant = ZEND_NUM_ARGS();
6767
variant > 0 && Z_TYPE(args[variant - 1]) == IS_NULL;
6868
variant--) {}
6969
if (variant == 4) {
7070
zend_argument_count_error("No variant with 4 arguments (excluding trailing NULLs)");
71-
return;
71+
RETURN_THROWS();
7272
}
7373

7474
// argument parsing

0 commit comments

Comments
 (0)