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 @@ -180,6 +180,7 @@
'newblog_notify_siteadmin' => [null, 'deprecated' => "''"],
'next_posts' => ['($display is true ? void : string)'],
'paginate_links' => ["(\$args is array{total: int<min, 1>}&array ? void : (\$args is array{type: 'array'}&array ? list<string> : string))"],
'path_join' => ['non-falsy-string'],
'post_type_archive_title' => ['($display is true ? void : string|void)'],
'prep_atom_text_construct' => ["array{'html'|'text'|'xhtml', string}"],
'previous_posts' => ['($display is true ? void : string)'],
Expand Down
12 changes: 12 additions & 0 deletions tests/data/return/path-join.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace PhpStubs\WordPress\Core\Tests;

use function path_join;
use function PHPStan\Testing\assertType;

assertType('non-falsy-string', path_join('', ''));
assertType('non-falsy-string', path_join('base', 'path'));
assertType('non-falsy-string', path_join(Faker::string(), Faker::string()));
1 change: 1 addition & 0 deletions wordpress-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -130066,6 +130066,7 @@ function path_is_absolute($path)
* @param string $base Base path.
* @param string $path Path relative to $base.
* @return string The path with the base or absolute path.
* @phpstan-return non-falsy-string
*/
function path_join($base, $path)
{
Expand Down
Loading