Skip to content

Commit 3d473eb

Browse files
committed
Align PHP stubs with the latest core documentation, adding missing @link annotations, @throws tags, method definitions, and class metadata for enhanced accuracy and consistency.
1 parent 599bf0f commit 3d473eb

93 files changed

Lines changed: 2142 additions & 478 deletions

File tree

Some content is hidden

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

Core/Core.php

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ function str_ends_with(string $haystack, string $needle): bool {}
170170
function str_contains(string $haystack, string $needle): bool {}
171171

172172
/**
173+
* Decrement an alphanumeric string
174+
*
175+
* Returns the decremented alphanumeric ASCII string.
176+
*
173177
* @link https://php.net/manual/en/function.str-decrement.php
174178
* @since 8.3
175179
* @throws \ValueError A ValueError is thrown if string is empty. A ValueError is thrown if string
@@ -179,6 +183,10 @@ function str_contains(string $haystack, string $needle): bool {}
179183
function str_decrement(string $string): string {}
180184

181185
/**
186+
* Increment an alphanumeric string
187+
*
188+
* Returns the incremented alphanumeric ASCII string.
189+
*
182190
* @link https://php.net/manual/en/function.str-increment.php
183191
* @since 8.3
184192
* @throws \ValueError A ValueError is thrown if string is empty. A ValueError is thrown if string
@@ -459,7 +467,7 @@ function property_exists($object_or_class, string $property): bool {}
459467
* @param string $trait Name of the trait to check
460468
* @param bool $autoload [optional] Whether to autoload if not already loaded.
461469
* @return bool Returns true if trait exists, false otherwise
462-
* @link https://secure.php.net/manual/en/function.trait-exists.php
470+
* @link https://php.net/manual/en/function.trait-exists.php
463471
* @since 5.4
464472
*/
465473
function trait_exists(string $trait, bool $autoload = true): bool {}
@@ -728,6 +736,10 @@ function set_error_handler(?callable $callback, int $error_levels = E_ALL) {}
728736
function restore_error_handler() {}
729737

730738
/**
739+
* Gets the user-defined error handler function
740+
*
741+
* Returns the current error handler function, if any.
742+
*
731743
* @link https://php.net/manual/en/function.get-error-handler.php
732744
* @since 8.5
733745
*/
@@ -749,6 +761,10 @@ function get_error_handler(): ?callable {}
749761
function set_exception_handler(?callable $callback) {}
750762

751763
/**
764+
* Gets the user-defined exception handler function
765+
*
766+
* Returns the current exception handler function, if any.
767+
*
752768
* @link https://php.net/manual/en/function.get-exception-handler.php
753769
* @since 8.5
754770
*/
@@ -789,7 +805,7 @@ function get_declared_interfaces(): array {}
789805
/**
790806
* Returns an array of all declared traits
791807
* @return array with names of all declared traits in values. Returns NULL in case of a failure.
792-
* @link https://secure.php.net/manual/en/function.get-declared-traits.php
808+
* @link https://php.net/manual/en/function.get-declared-traits.php
793809
* @see class_uses()
794810
* @since 5.4
795811
*/
@@ -1164,6 +1180,11 @@ function gc_mem_caches(): int {}
11641180
function get_resources(?string $type = null): array {}
11651181

11661182
/**
1183+
* Terminate the current script with a status code or message
1184+
*
1185+
* Terminates execution of the script. Shutdown functions and object destructors will always be
1186+
* executed even if exit is called. However, finally blocks are never executed.
1187+
*
11671188
* @link https://php.net/manual/en/function.exit.php
11681189
* @since 8.4
11691190
*/

0 commit comments

Comments
 (0)