Skip to content

Commit e78cebd

Browse files
committed
More coding standard fixes
1 parent 5260d33 commit e78cebd

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,13 @@ public function test_permission_callback_no_input_schema_match(): void {
229229
public function test_permission_callback_receives_input(): void {
230230
do_action( 'abilities_api_init' );
231231

232-
$received_input = null;
232+
$received_input = null;
233233
self::$test_ability_properties['permission_callback'] = function ( array $input ) use ( &$received_input ): bool {
234234
$received_input = $input;
235235
// Allow only if 'a' is greater than 'b'
236236
return $input['a'] > $input['b'];
237237
};
238+
238239
$result = wp_register_ability( self::$test_ability_name, self::$test_ability_properties );
239240

240241
// Test with a > b (should be allowed)
@@ -337,9 +338,9 @@ public function test_get_all_registered_abilities() {
337338
wp_register_ability( $ability_three_name, $ability_three_properties );
338339

339340
$expected = array(
340-
$ability_one_name => new WP_Ability( $ability_one_name, $ability_one_properties ),
341-
$ability_two_name => new WP_Ability( $ability_two_name, $ability_two_properties ),
342-
$ability_three_name => new WP_Ability( $ability_three_name, $ability_three_properties ),
341+
$ability_one_name => new WP_Ability( $ability_one_name, $ability_one_properties ),
342+
$ability_two_name => new WP_Ability( $ability_two_name, $ability_two_properties ),
343+
$ability_three_name => new WP_Ability( $ability_three_name, $ability_three_properties ),
343344
);
344345

345346
$result = wp_get_abilities();

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function test_register_invalid_uppercase_characters_in_name() {
115115
*/
116116
public function test_register_invalid_name_using_instance() {
117117
$ability = new WP_Ability( 'invalid_name', array() );
118-
$result = $this->registry->register( $ability );
118+
$result = $this->registry->register( $ability );
119119
$this->assertNull( $result );
120120
}
121121

@@ -314,7 +314,7 @@ public function test_register_new_ability() {
314314
*/
315315
public function test_register_new_ability_using_instance() {
316316
$ability = new WP_Ability( self::$test_ability_name, self::$test_ability_properties );
317-
$result = $this->registry->register( $ability );
317+
$result = $this->registry->register( $ability );
318318

319319
$this->assertSame( $ability, $result );
320320
}
@@ -407,13 +407,13 @@ public function test_unregister_for_known_ability() {
407407
* @covers WP_Abilities_Registry::get_all_registered
408408
*/
409409
public function test_get_all_registered() {
410-
$ability_one_name = 'test/one';
410+
$ability_one_name = 'test/one';
411411
$this->registry->register( $ability_one_name, self::$test_ability_properties );
412412

413-
$ability_two_name = 'test/two';
413+
$ability_two_name = 'test/two';
414414
$this->registry->register( $ability_two_name, self::$test_ability_properties );
415415

416-
$ability_three_name = 'test/three';
416+
$ability_three_name = 'test/three';
417417
$this->registry->register( $ability_three_name, self::$test_ability_properties );
418418

419419
$result = $this->registry->get_all_registered();

0 commit comments

Comments
 (0)