Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions functionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'__return_empty_array' => ['array{}'],
'__return_empty_string' => ["''"],
'__return_zero' => ['0'],
'_get_cron_array' => ['array<int, array<string, array<string, array{schedule: string|false, args: array<mixed>, interval?: int<0, max>}>>>'],
'_get_list_table' => ["(\$class_name is 'WP_Posts_List_Table'|'WP_Media_List_Table'|'WP_Terms_List_Table'|'WP_Users_List_Table'|'WP_Comments_List_Table'|'WP_Post_Comments_List_Table'|'WP_Links_List_Table'|'WP_Plugin_Install_List_Table'|'WP_Themes_List_Table'|'WP_Theme_Install_List_Table'|'WP_Plugins_List_Table'|'WP_Application_Passwords_List_Table'|'WP_MS_Sites_List_Table'|'WP_MS_Users_List_Table'|'WP_MS_Themes_List_Table'|'WP_Privacy_Data_Export_Requests_List_Table'|'WP_Privacy_Data_Removal_Requests_List_Table' ? new<T> : false)", '@phpstan-template T' => 'of string', 'class_name' => 'T', 'args' => 'array{screen?: string}'],
'_load_remote_block_patterns' => [null, 'deprecated' => 'null'],
'absint' => ['($maybeint is T&int<0, max> ? T : ($maybeint is int<min, -1> ? int<1, max> : ($maybeint is empty ? 0 : ($maybeint is numeric-string ? int<0, max> : ($maybeint is string ? 0 : ($maybeint is true|non-empty-array ? 1 : ($maybeint is bool ? 0|1 : int<0, max>)))))))', '@phpstan-template T' => 'of int', 'maybeint' => 'T|scalar|array|resource|null', '@phpstan-pure' => ''],
Expand Down
13 changes: 13 additions & 0 deletions tests/data/return/get-cron-array.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace PhpStubs\WordPress\Core\Tests;

use function PHPStan\Testing\assertType;
use function _get_cron_array;

assertType(
'array<int, array<string, array<string, array{schedule: string|false, args: array<mixed>, interval?: int<0, max>}>>>',
_get_cron_array()
);
1 change: 1 addition & 0 deletions wordpress-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -122111,6 +122111,7 @@ function wp_get_ready_cron_jobs()
* @access private
*
* @return array[] Array of cron events.
* @phpstan-return array<int, array<string, array<string, array{schedule: string|false, args: array<mixed>, interval?: int<0, max>}>>>
*/
function _get_cron_array()
{
Expand Down
Loading