Skip to content

Commit 046cc5e

Browse files
committed
Add another round of missing parameter types to stubs
Closes GH-5950
1 parent 7b9f37c commit 046cc5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+255
-213
lines changed

ext/com_dotnet/com_extension.stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ function com_create_guid(): string|false {}
6161
/** @param array|string|null $sinkinterface */
6262
function com_event_sink(variant $comobject, object $sinkobject, $sinkinterface = UNKNOWN): bool {}
6363

64+
/** @param com|dotnet|variant|string $comobject */
6465
function com_print_typeinfo($comobject, ?string $dispinterface = null, bool $wantsink = false): bool {}
6566

6667
function com_message_pump(int $timeoutms = 0): bool {}

ext/com_dotnet/com_extension_arginfo.h

Lines changed: 1 addition & 1 deletion
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: caec4bba1103a07a86803ac0192782fef7d6680f */
2+
* Stub hash: 48167f9ee38966beaf550cd0a7b07d873575b48e */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_set, 0, 2, IS_VOID, 0)
55
ZEND_ARG_OBJ_INFO(0, variant, variant, 0)

ext/date/php_date.stub.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,12 @@ public static function __set_state(array $array) {}
393393

394394
class DatePeriod implements IteratorAggregate
395395
{
396-
/* Has an overloaded signature */
396+
/**
397+
* @param DateTimeInterface|string $start
398+
* @param DateInterval|int $interval
399+
* @param DateTimeInterface|int $end
400+
* @param int $options
401+
*/
397402
public function __construct($start, $interval = UNKNOWN, $end = UNKNOWN, $options = UNKNOWN) {}
398403

399404
/** @return DateTimeInterface */

ext/date/php_date_arginfo.h

Lines changed: 1 addition & 1 deletion
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: aa0e2c059662d4015658b85c932126b34934b5a4 */
2+
* Stub hash: fee95924adec03c89fdd677ec26bb6eea34d4b3c */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)

ext/exif/exif.stub.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ function exif_tagname(int $index): string|false {}
77
/** @param resource|string $filename */
88
function exif_read_data($filename, ?string $sections_needed = null, bool $sub_arrays = false, bool $read_thumbnail = false): array|false {}
99

10-
/** @param resource|string $filename */
10+
/**
11+
* @param resource|string $filename
12+
* @param int $width
13+
* @param int $height
14+
* @param int $imagetype
15+
*/
1116
function exif_thumbnail($filename, &$width = null, &$height = null, &$imagetype = null): string|false {}
1217

1318
function exif_imagetype(string $filename): int|false {}

ext/exif/exif_arginfo.h

Lines changed: 1 addition & 1 deletion
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: 62f6ca1a43c69d917711eae9118caf5a658722d9 */
2+
* Stub hash: d8cb3719a7de74b27b306c30b6be0af0647b6af4 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_tagname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)

ext/intl/calendar/calendar.stub.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public function isSet(int $field) {}
235235
* @return bool
236236
* @alias intlcal_set
237237
*/
238-
public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) {}
238+
public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) {}
239239

240240
/**
241241
* @return bool
@@ -283,6 +283,14 @@ public function toDateTime() {}
283283

284284
class IntlGregorianCalendar extends IntlCalendar
285285
{
286+
/**
287+
* @param DateTimeZone|IntlTimeZone|string|int|null $timeZoneOrYear
288+
* @param string|int|null $localeOrMonth
289+
* @param int $dayOfMonth
290+
* @param int $hour
291+
* @param int $minute
292+
* @param int $second
293+
*/
286294
public function __construct($timeZoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $dayOfMonth = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN) {}
287295

288296
/**

ext/intl/calendar/calendar_arginfo.h

Lines changed: 2 additions & 2 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: 8b8a98d5035880031ac42fda5e58bde54c1d85fc */
2+
* Stub hash: 3facb6bdce18efae3d6b9594d1fcddfb220dd54d */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar___construct, 0, 0, 0)
55
ZEND_END_ARG_INFO()
@@ -115,7 +115,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_set, 0, 0, 2)
115115
ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0)
116116
ZEND_ARG_TYPE_INFO(0, month, IS_LONG, 0)
117117
ZEND_ARG_TYPE_INFO(0, dayOfMonth, IS_LONG, 0)
118-
ZEND_ARG_INFO(0, hour)
118+
ZEND_ARG_TYPE_INFO(0, hour, IS_LONG, 0)
119119
ZEND_ARG_TYPE_INFO(0, minute, IS_LONG, 0)
120120
ZEND_ARG_TYPE_INFO(0, second, IS_LONG, 0)
121121
ZEND_END_ARG_INFO()

ext/intl/collator/collator.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function compare(string $str1, string $str2) {}
2222
* @return bool
2323
* @alias collator_sort
2424
*/
25-
public function sort(array &$arr, $sort_flag = Collator::SORT_REGULAR) {}
25+
public function sort(array &$arr, int $sort_flag = Collator::SORT_REGULAR) {}
2626

2727
/**
2828
* @return bool

ext/intl/collator/collator_arginfo.h

Lines changed: 3 additions & 6 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: 95fee5001472494653e6a83467c3c0079ea70728 */
2+
* Stub hash: 4cb1470cf2566c9d947be638c7d14a14a10290dd */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
@@ -14,17 +14,14 @@ ZEND_END_ARG_INFO()
1414

1515
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_sort, 0, 0, 1)
1616
ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0)
17-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, sort_flag, "Collator::SORT_REGULAR")
17+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sort_flag, IS_LONG, 0, "Collator::SORT_REGULAR")
1818
ZEND_END_ARG_INFO()
1919

2020
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_sortWithSortKeys, 0, 0, 1)
2121
ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0)
2222
ZEND_END_ARG_INFO()
2323

24-
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_asort, 0, 0, 1)
25-
ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0)
26-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sort_flag, IS_LONG, 0, "Collator::SORT_REGULAR")
27-
ZEND_END_ARG_INFO()
24+
#define arginfo_class_Collator_asort arginfo_class_Collator_sort
2825

2926
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_getAttribute, 0, 0, 1)
3027
ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)

0 commit comments

Comments
 (0)