Skip to content

Commit e53d4f9

Browse files
committed
Change the order of the two class constants
1 parent a09975d commit e53d4f9

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

WordPress/Sniffs/WP/GetMetaSingleSniff.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,44 +34,44 @@ final class GetMetaSingleSniff extends AbstractFunctionParameterSniff {
3434
const METRIC_NAME = 'get_*meta() function called with $single parameter';
3535

3636
/**
37-
* Relevant signature structure for specific meta functions.
37+
* Relevant signature structure for generic meta functions.
3838
*
39-
* These functions use 'key' as the parameter name at position 2 and
40-
* 'single' as the parameter name at position 3.
39+
* These functions use 'meta_key' as the parameter name at position 3 and
40+
* 'single' as the parameter name at position 4.
4141
*
4242
* @since 3.3.0
4343
*
4444
* @var array<string, array<string, int|string>>
4545
*/
46-
const SPECIFIC_META_FUNCTIONS_FORMAT = array(
46+
const GENERIC_META_FUNCTIONS_FORMAT = array(
4747
'condition' => array(
48-
'param_name' => 'key',
49-
'position' => 2,
48+
'param_name' => 'meta_key',
49+
'position' => 3,
5050
),
5151
'recommended' => array(
5252
'param_name' => 'single',
53-
'position' => 3,
53+
'position' => 4,
5454
),
5555
);
5656

5757
/**
58-
* Relevant signature structure for generic meta functions.
58+
* Relevant signature structure for specific meta functions.
5959
*
60-
* These functions use 'meta_key' as the parameter name at position 3 and
61-
* 'single' as the parameter name at position 4.
60+
* These functions use 'key' as the parameter name at position 2 and
61+
* 'single' as the parameter name at position 3.
6262
*
6363
* @since 3.3.0
6464
*
6565
* @var array<string, array<string, int|string>>
6666
*/
67-
const GENERIC_META_FUNCTIONS_FORMAT = array(
67+
const SPECIFIC_META_FUNCTIONS_FORMAT = array(
6868
'condition' => array(
69-
'param_name' => 'meta_key',
70-
'position' => 3,
69+
'param_name' => 'key',
70+
'position' => 2,
7171
),
7272
'recommended' => array(
7373
'param_name' => 'single',
74-
'position' => 4,
74+
'position' => 3,
7575
),
7676
);
7777

0 commit comments

Comments
 (0)