@@ -86,7 +86,7 @@ final class OptionAutoloadSniff extends AbstractFunctionParameterSniff {
8686 *
8787 * @since 3.2.0
8888 *
89- * @var string[]
89+ * @var array< string, string>
9090 */
9191 protected static $ fixable_values = array (
9292 'yes ' => 'true ' ,
@@ -266,7 +266,8 @@ protected function handle_wp_set_option_autoload_values( array $options_param, $
266266 * @since 3.2.0
267267 *
268268 * @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.
270271 *
271272 * @return void
272273 */
@@ -290,8 +291,9 @@ protected function maybe_display_missing_autoload_warning( $stackPtr, $function_
290291 * @since 3.2.0
291292 *
292293 * @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.
295297 *
296298 * @return void
297299 */
@@ -312,7 +314,7 @@ protected function check_autoload_value( array $autoload_info, $function_name )
312314
313315 $ normalized_value = strtolower ( $ autoload_info ['clean ' ] );
314316
315- if ( T_NS_SEPARATOR === $ this ->tokens [ $ param_first_token ]['code ' ]
317+ if ( \ T_NS_SEPARATOR === $ this ->tokens [ $ param_first_token ]['code ' ]
316318 && $ param_second_token
317319 && in_array ( strtolower ( $ this ->tokens [ $ param_second_token ]['content ' ] ), self ::$ valid_values_add_and_update , true )
318320 ) {
@@ -334,7 +336,7 @@ protected function check_autoload_value( array $autoload_info, $function_name )
334336 return ;
335337 }
336338
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 )
338340 && 'null ' !== strtolower ( $ this ->tokens [ $ param_first_token ]['content ' ] )
339341 ) {
340342 // Bail early if the first non-empty token in the parameter is T_VARIABLE or T_STRING as
0 commit comments