File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ public function dataFileAsserts(): iterable
4343 yield from $ this ->gatherAssertTypes (__DIR__ . '/data/get_user.php ' );
4444 yield from $ this ->gatherAssertTypes (__DIR__ . '/data/get_user_by.php ' );
4545 yield from $ this ->gatherAssertTypes (__DIR__ . '/data/has_filter.php ' );
46+ yield from $ this ->gatherAssertTypes (__DIR__ . '/data/have_posts.php ' );
4647 yield from $ this ->gatherAssertTypes (__DIR__ . '/data/is_new_day.php ' );
4748 yield from $ this ->gatherAssertTypes (__DIR__ . '/data/is_wp_error.php ' );
4849 yield from $ this ->gatherAssertTypes (__DIR__ . '/data/mysql2date.php ' );
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace PhpStubs \WordPress \Core \Tests ;
6+
7+ use function have_posts ;
8+ use function PHPStan \Testing \assertType ;
9+
10+ assertType ('bool ' , have_posts ());
11+
12+ if (have_posts ()) {
13+ assertType ('bool ' , have_posts ());
14+ }
15+
16+ if (! have_posts ()) {
17+ assertType ('bool ' , have_posts ());
18+ }
You can’t perform that action at this time.
0 commit comments