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 @@ -253,6 +253,7 @@
'wp_generate_uuid4' => ['lowercase-string&non-falsy-string', '@phpstan-impure' => ''],
'wp_get_archives' => ['($args is array{echo: false|0, ...} ? string|void : void)'],
'wp_get_comment_status' => ["'approved'|'spam'|'trash'|'unapproved'|false"],
'wp_get_development_mode' => ["''|'all'|'core'|'plugin'|'theme'"],
'wp_get_elements_class_name' => ['lowercase-string&non-falsy-string'],
'wp_get_http_headers' => [null, 'deprecated' => 'false'],
'wp_get_inline_script_tag' => ['non-falsy-string', 'attributes' => 'array<string, string|true>'],
Expand Down
14 changes: 14 additions & 0 deletions tests/data/return/wp-get-development-mode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

namespace PhpStubs\WordPress\Core\Tests;

use function wp_get_development_mode;
use function PHPStan\Testing\assertType;

assertType("''|'all'|'core'|'plugin'|'theme'", wp_get_development_mode());
assertType('false', wp_get_development_mode() === 'dev');
assertType('false', wp_get_development_mode() === 'Theme');
assertType('bool', wp_get_development_mode() === 'theme');
assertType('bool', wp_get_development_mode() === Faker::string());
1 change: 1 addition & 0 deletions wordpress-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -142966,6 +142966,7 @@ function wp_get_environment_type()
* @since 6.3.0
*
* @return string The current development mode.
* @phpstan-return ''|'all'|'core'|'plugin'|'theme'
*/
function wp_get_development_mode()
{
Expand Down
Loading