Skip to content

Commit 037777e

Browse files
committed
Fix coding standards: Yoda condition and alignment
1 parent 86f31ab commit 037777e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/php/includes/test-acf-internal-post-type-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public function test_is_internal_post_type_key_valid( $post_type, $key_prefix )
342342
*/
343343
public function test_is_internal_post_type_key_wrong_prefix( $post_type, $key_prefix ) {
344344
// Use a different prefix than expected.
345-
$wrong_prefix = $key_prefix === 'group_' ? 'post_type_' : 'group_';
345+
$wrong_prefix = 'group_' === $key_prefix ? 'post_type_' : 'group_';
346346
$this->assertFalse(
347347
acf_is_internal_post_type_key( $wrong_prefix . 'abc123', $post_type ),
348348
"Should return false for {$wrong_prefix} key when checking {$post_type}"

tests/php/includes/test-scf-ui-options-page-functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ public function test_multiple_options_pages_same_parent() {
10151015
'parent_slug' => $parent_slug,
10161016
'active' => true,
10171017
);
1018-
$child1 = acf_update_ui_options_page( $child1_data );
1018+
$child1 = acf_update_ui_options_page( $child1_data );
10191019

10201020
// Create second child.
10211021
$child2_data = array(
@@ -1025,7 +1025,7 @@ public function test_multiple_options_pages_same_parent() {
10251025
'parent_slug' => $parent_slug,
10261026
'active' => true,
10271027
);
1028-
$child2 = acf_update_ui_options_page( $child2_data );
1028+
$child2 = acf_update_ui_options_page( $child2_data );
10291029

10301030
$this->assertEquals( $parent_slug, $child1['parent_slug'], 'First child should have correct parent' );
10311031
$this->assertEquals( $parent_slug, $child2['parent_slug'], 'Second child should have correct parent' );

0 commit comments

Comments
 (0)