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 @@ -364,6 +364,7 @@
'WP_Block_List::offsetGet' => ['\WP_Block|null', 'offset' => 'int'],
'WP_Block_List::offsetSet' => ['void', 'offset' => 'int|null'],
'WP_Block_List::offsetUnset' => ['void', 'offset' => 'int'],
'WP_Comments_List_Table::floated_admin_avatar' => ['non-falsy-string'],
'WP_Object_Cache::delete' => [null, 'deprecated' => 'false'],
'WP_Dependencies::$groups' => [null, '@phpstan-var' => 'array<string, int|false>'],
'WP_Dependencies::get_etag' => ['non-falsy-string'],
Expand Down
15 changes: 15 additions & 0 deletions tests/data/return/wp-comments-list-table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace PhpStubs\WordPress\Core\Tests;

use WP_Comments_List_Table;

use function PHPStan\Testing\assertType;

$commentsListTable = new WP_Comments_List_Table();

assertType('non-falsy-string', $commentsListTable->floated_admin_avatar('', 0));
assertType('non-falsy-string', $commentsListTable->floated_admin_avatar('name', 123));
assertType('non-falsy-string', $commentsListTable->floated_admin_avatar(Faker::string(), Faker::int()));
1 change: 1 addition & 0 deletions wordpress-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4481,6 +4481,7 @@ public function __construct($args = array())
* @param string $name Comment author name.
* @param int $comment_id Comment ID.
* @return string Avatar with the user name.
* @phpstan-return non-falsy-string
*/
public function floated_admin_avatar($name, $comment_id)
{
Expand Down
Loading