Skip to content

Commit 9513cbc

Browse files
pbearnewestonruter
andauthored
Apply suggestions from code review
Co-authored-by: Weston Ruter <westonruter@gmail.com>
1 parent 70d2ce4 commit 9513cbc

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ public function test_got_mod_rewrite( $expected, $apache_loaded, $filter_value =
2727
// without a framework, we rely on the filter for full control.
2828

2929
if ( null !== $filter_value ) {
30-
add_filter( 'got_rewrite', function() use ( $filter_value ) { return $filter_value; } );
30+
add_filter(
31+
'got_rewrite',
32+
static function () use ( $filter_value ) {
33+
return $filter_value;
34+
}
35+
);
3136
}
3237

3338
// If we are NOT filtering, we need to be aware of the environment.
@@ -42,13 +47,7 @@ public function test_got_mod_rewrite( $expected, $apache_loaded, $filter_value =
4247
/**
4348
* Data provider for test_got_mod_rewrite.
4449
*
45-
* @return array[] {
46-
* @type bool $expected The expected result.
47-
* @type bool $apache_loaded Whether mod_rewrite is loaded (simulated via filter).
48-
* @type bool|null $filter_value The value to return from the filter.
49-
* }
50-
*
51-
* @phpstan-return array<string, array{
50+
* @return array<string, array{
5251
* expected: bool,
5352
* apache_loaded: bool,
5453
* filter_value: bool|null,

0 commit comments

Comments
 (0)