Skip to content

Commit 2b48e41

Browse files
committed
Use one error code for fixable internal values and another for non-fixable internal values
1 parent 4944d88 commit 2b48e41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WordPress/Sniffs/WP/OptionAutoloadSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,11 @@ private function check_autoload_value( array $autoload_info, $function_name ) {
394394
$data = array( $autoload_info['clean'], $this->fixable_values[ $autoload_value ] );
395395
} elseif ( isset( $this->internal_values_fixable[ $autoload_value ] ) ) {
396396
$message = 'The use of `%s` as the value of the `$autoload` parameter is discouraged. Use `%s` instead.';
397-
$error_code = 'InternalUseOnly';
397+
$error_code = 'InternalUseOnlyOnOff';
398398
$data = array( $autoload_info['clean'], $this->fixable_values[ $autoload_value ] );
399399
} elseif ( isset( $this->internal_values_non_fixable [ $autoload_value ] ) ) {
400400
$message = 'The use of `%s` as the value of the `$autoload` parameter is discouraged.';
401-
$error_code = 'InternalUseOnly';
401+
$error_code = 'InternalUseOnlyAuto';
402402
$data = array( $autoload_info['clean'] );
403403
} else {
404404
$valid_values_string = '`' . implode( '`, `', $valid_values ) . '`';

0 commit comments

Comments
 (0)