Skip to content

Commit 27f32fa

Browse files
authored
Fix param type for wp_trigger_error() (#272)
Closes #270
1 parent 6665a04 commit 27f32fa

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

functionMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
'wp_schedule_single_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType],
8585
'wp_slash' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],
8686
'wp_tag_cloud' => ["(\$args is array{format: 'array'}&array ? array<int, string>|void : (\$args is array{echo: false|0}&array ? string|void : void))"],
87-
'wp_trigger_error' => [null, 'function_name' => 'callable-string', 'error_level' => '\E_USER_ERROR|\E_USER_WARNING|\E_USER_NOTICE|\E_USER_DEPRECATED'],
87+
'wp_trigger_error' => [null, 'error_level' => '\E_USER_ERROR|\E_USER_WARNING|\E_USER_NOTICE|\E_USER_DEPRECATED'],
8888
'wp_unique_id' => ['($prefix is empty ? numeric-string : ($prefix is numeric ? numeric-string : string))'],
8989
'wp_unschedule_event' => ['($wp_error is false ? bool : true|\WP_Error)', 'args' => $cronArgsType],
9090
'wp_unslash' => ['T', '@phpstan-template' => 'T', 'value' => 'T'],

wordpress-stubs.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112531,7 +112531,6 @@ function _doing_it_wrong($function_name, $message, $version)
112531112531
* before passing to this function to avoid being stripped {@see wp_kses()}.
112532112532
* @param int $error_level Optional. The designated error type for this error.
112533112533
* Only works with E_USER family of constants. Default E_USER_NOTICE.
112534-
* @phpstan-param callable-string $function_name
112535112534
* @phpstan-param \E_USER_ERROR|\E_USER_WARNING|\E_USER_NOTICE|\E_USER_DEPRECATED $error_level
112536112535
* @phpstan-return void
112537112536
*/

0 commit comments

Comments
 (0)