Skip to content

Commit cb6ff32

Browse files
Add a few types to zend_builtin_functions stub
1 parent 9f586f6 commit cb6ff32

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

Zend/zend_builtin_functions.stub.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,12 @@ function get_mangled_object_vars(object $object): array {}
6565
*/
6666
function get_class_methods(object|string $object_or_class): array {}
6767

68-
/** @param object|string $object_or_class */
69-
function method_exists($object_or_class, string $method): bool {}
68+
function method_exists(object|string $object_or_class, string $method): bool {}
7069

7170
/**
72-
* @param object|string $object_or_class
7371
* @frameless-function {"arity": 2}
7472
*/
75-
function property_exists($object_or_class, string $property): bool {}
73+
function property_exists(object|string $object_or_class, string $property): bool {}
7674

7775
/**
7876
* @frameless-function {"arity": 1}
@@ -107,13 +105,11 @@ function trigger_error(string $message, int $error_level = E_USER_NOTICE): true
107105
/** @alias trigger_error */
108106
function user_error(string $message, int $error_level = E_USER_NOTICE): true {}
109107

110-
/** @return callable|null */
111-
function set_error_handler(?callable $callback, int $error_levels = E_ALL) {}
108+
function set_error_handler(?callable $callback, int $error_levels = E_ALL): ?callable {}
112109

113110
function restore_error_handler(): true {}
114111

115-
/** @return callable|null */
116-
function set_exception_handler(?callable $callback) {}
112+
function set_exception_handler(?callable $callback): ?callable {}
117113

118114
function restore_exception_handler(): true {}
119115

Zend/zend_builtin_functions_arginfo.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)