@@ -86,7 +86,7 @@ final class OptionAutoloadSniff extends AbstractFunctionParameterSniff {
86
86
*
87
87
* @since 3.2.0
88
88
*
89
- * @var string[]
89
+ * @var array< string, string>
90
90
*/
91
91
protected static $ fixable_values = array (
92
92
'yes ' => 'true ' ,
@@ -266,7 +266,8 @@ protected function handle_wp_set_option_autoload_values( array $options_param, $
266
266
* @since 3.2.0
267
267
*
268
268
* @param int $stackPtr The position of the current token in the stack.
269
- * @param string $function_name The name of the function being checked.
269
+ * @param string $function_name The token content (function name) which was matched
270
+ * in lowercase.
270
271
*
271
272
* @return void
272
273
*/
@@ -290,8 +291,9 @@ protected function maybe_display_missing_autoload_warning( $stackPtr, $function_
290
291
* @since 3.2.0
291
292
*
292
293
* @param array $autoload_info Information about the autoload value (start and end tokens and
293
- * the clean and raw value).
294
- * @param string $function_name The name of the function being checked.
294
+ * the clean value).
295
+ * @param string $function_name The token content (function name) which was matched
296
+ * in lowercase.
295
297
*
296
298
* @return void
297
299
*/
@@ -312,7 +314,7 @@ protected function check_autoload_value( array $autoload_info, $function_name )
312
314
313
315
$ normalized_value = strtolower ( $ autoload_info ['clean ' ] );
314
316
315
- if ( T_NS_SEPARATOR === $ this ->tokens [ $ param_first_token ]['code ' ]
317
+ if ( \ T_NS_SEPARATOR === $ this ->tokens [ $ param_first_token ]['code ' ]
316
318
&& $ param_second_token
317
319
&& in_array ( strtolower ( $ this ->tokens [ $ param_second_token ]['content ' ] ), self ::$ valid_values_add_and_update , true )
318
320
) {
@@ -334,7 +336,7 @@ protected function check_autoload_value( array $autoload_info, $function_name )
334
336
return ;
335
337
}
336
338
337
- if ( in_array ( $ this ->tokens [ $ param_first_token ]['code ' ], array ( T_VARIABLE , T_STRING ), true )
339
+ if ( in_array ( $ this ->tokens [ $ param_first_token ]['code ' ], array ( \ T_VARIABLE , \ T_STRING ), true )
338
340
&& 'null ' !== strtolower ( $ this ->tokens [ $ param_first_token ]['content ' ] )
339
341
) {
340
342
// Bail early if the first non-empty token in the parameter is T_VARIABLE or T_STRING as
0 commit comments