Skip to content

Commit 58f6e5b

Browse files
pbearnewestonruter
andauthored
Apply suggestions from code review
Co-authored-by: Weston Ruter <westonruter@gmail.com>
1 parent 12b5972 commit 58f6e5b

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

tests/phpunit/tests/admin/includes/misc/gotUrlRewrite.php

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ class Tests_got_url_rewrite extends WP_UnitTestCase {
1212

1313
/**
1414
* Saved value of the $is_nginx global.
15-
* @var bool
1615
*/
17-
private $prev_nginx;
16+
private bool $prev_nginx;
1817

1918
/**
2019
* Saved value of the $is_caddy global.
21-
* @var bool
2220
*/
23-
private $prev_caddy;
21+
private bool $prev_caddy;
2422

2523
public function set_up() {
2624
parent::set_up();
@@ -75,22 +73,12 @@ public function test_got_url_rewrite( $expected, $mod_rewrite, $is_nginx_val, $i
7573
remove_filter( 'got_rewrite', $mod_rewrite ? '__return_true' : '__return_false' );
7674
if ( null !== $filter_val ) {
7775
remove_filter( 'got_url_rewrite', $filter_val ? '__return_true' : '__return_false' );
78-
}
7976
}
8077

8178
/**
8279
* Data provider for test_got_url_rewrite.
8380
*
84-
* @return array[] {
85-
* @type bool $expected The expected result.
86-
* @type bool $mod_rewrite Whether mod_rewrite is supported.
87-
* @type bool $is_nginx Whether server is nginx.
88-
* @type bool $is_caddy Whether server is Caddy.
89-
* @type bool $iis7_perm Whether IIS7 supports permalinks.
90-
* @type bool|null $filter_val Optional filter value.
91-
* }
92-
*
93-
* @phpstan-return array<string, array{
81+
* @return array<string, array{
9482
* expected: bool,
9583
* mod_rewrite: bool,
9684
* is_nginx: bool,

0 commit comments

Comments
 (0)