Skip to content

Commit 30fec76

Browse files
committed
Address review comments
1 parent 4a66341 commit 30fec76

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

ext/spl/php_spl.stub.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22

33
/* ext/spl/php_spl.c */
44

5-
function class_implements($what, bool $autoload = true) : array|false { }
5+
function class_implements($what, bool $autoload = true): array|false {}
66

7-
function class_parents($instance, bool $autoload = true) : array|false {}
7+
function class_parents($instance, bool $autoload = true): array|false {}
88

9-
function class_uses($what, bool $autoload = true) : array|false {}
9+
function class_uses($what, bool $autoload = true): array|false {}
1010

11-
function spl_autoload(string $class_name, string $file_extensions = '.inc,.php') : void {}
11+
function spl_autoload(string $class_name, string $file_extensions = UNKNOWN): void {}
1212

1313
// This silently ignores non-string class names
14-
function spl_autoload_call($class_name) : void {}
14+
function spl_autoload_call($class_name): void {}
1515

16-
function spl_autoload_extensions(string $file_extensions = '') : string {}
16+
function spl_autoload_extensions(string $file_extensions = UNKNOWN): string {}
1717

18-
function spl_autoload_functions() : array|false {}
18+
function spl_autoload_functions(): array|false {}
1919

20-
function spl_autoload_register($autoload_function = null, bool $throw = true, bool $prepend = false) : bool {}
20+
function spl_autoload_register($autoload_function = null, bool $throw = true, bool $prepend = false): bool {}
2121

22-
function spl_autoload_unregister($autoload_function) : bool {}
22+
function spl_autoload_unregister($autoload_function): bool {}
2323

24-
function spl_classes() : array {}
24+
function spl_classes(): array {}
2525

26-
function spl_object_hash(object $obj) : string {}
26+
function spl_object_hash(object $obj): string {}
2727

28-
function spl_object_id(object $obj) : int {}
28+
function spl_object_id(object $obj): int {}
2929

3030
/* ext/spl/spl_iterators.c */
31-
function iterator_apply(Traversable $iterator, $function, ?array $args = null) : int {}
31+
function iterator_apply(Traversable $iterator, callable $function, ?array $args = null): int {}
3232

33-
function iterator_count(Traversable $iterator) : int {}
33+
function iterator_count(Traversable $iterator): int {}
3434

35-
function iterator_to_array(Traversable $iterator, bool $use_keys = true) : array { }
35+
function iterator_to_array(Traversable $iterator, bool $use_keys = true): array {}

ext/spl/php_spl_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ZEND_END_ARG_INFO()
5151

5252
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iterator_apply, 0, 2, IS_LONG, 0)
5353
ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0)
54-
ZEND_ARG_INFO(0, function)
54+
ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0)
5555
ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 1)
5656
ZEND_END_ARG_INFO()
5757

0 commit comments

Comments
 (0)