Skip to content

Commit 19a528e

Browse files
committed
Tests #64990: Fix PHPCS - rename reserved keyword $include to $should_include in filter callbacks
1 parent 4a58fdd commit 19a528e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/phpunit/tests/abilities-api/wpGetAbilities.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ public function test_wp_get_abilities_match_filter_can_exclude_ability(): void {
461461
$this->register_test_ability( 'test/ability-one' );
462462
$this->register_test_ability( 'test/ability-two' );
463463

464-
$filter = static function ( bool $include, WP_Ability $ability ): bool {
464+
$filter = static function ( bool $should_include, WP_Ability $ability ): bool {
465465
return 'test/ability-two' !== $ability->get_name();
466466
};
467467

@@ -495,7 +495,7 @@ public function test_wp_get_abilities_match_filter_receives_ability_and_args():
495495
$query_args = array( 'namespace' => 'test' );
496496

497497
$filter = static function (
498-
bool $include,
498+
bool $should_include,
499499
WP_Ability $ability,
500500
array $args
501501
) use (
@@ -504,7 +504,7 @@ public function test_wp_get_abilities_match_filter_receives_ability_and_args():
504504
): bool {
505505
$received_ability = $ability;
506506
$received_args = $args;
507-
return $include;
507+
return $should_include;
508508
};
509509

510510
add_filter( 'wp_get_abilities_match', $filter, 10, 3 );

0 commit comments

Comments
 (0)