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 @@ -184,6 +184,7 @@
'wp_get_script_tag' => ['non-falsy-string', 'attributes' => 'array<string, string|true>'],
'wp_get_server_protocol' => ["'HTTP/1.0'|'HTTP/1.1'|'HTTP/2'|'HTTP/2.0'|'HTTP/3'"],
'wp_get_speculation_rules_configuration' => ["array{mode: 'prefetch'|'prerender', eagerness: 'conservative'|'eager'|'moderate'}|null"],
'wp_get_wp_version' => ['non-falsy-string'],
'wp_hash' => ['lowercase-string&non-falsy-string', 'scheme' => "'auth'|'logged_in'|'nonce'|'secure_auth'"],
'wp_html_split' => ['non-empty-list<string>'],
'wp_http_validate_url' => ["(TUrl is numeric|'' ? false : TUrl|false)", '@phpstan-template TUrl' => 'of string', 'url' => 'TUrl'],
Expand Down
10 changes: 10 additions & 0 deletions tests/data/return/wp-get-wp-version.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

declare(strict_types=1);

namespace PhpStubs\WordPress\Core\Tests;

use function wp_get_wp_version;
use function PHPStan\Testing\assertType;

assertType('non-falsy-string', wp_get_wp_version());
1 change: 1 addition & 0 deletions wordpress-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -114230,6 +114230,7 @@ function clean_dirsize_cache($path)
* @since 6.7.0
*
* @return string The current WordPress version.
* @phpstan-return non-falsy-string
*/
function wp_get_wp_version()
{
Expand Down