File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -293,10 +293,10 @@ private function handle_wp_set_option_autoload_values( array $options_param ) {
293
293
* @return void
294
294
*/
295
295
private function maybe_display_missing_autoload_warning ( $ stackPtr , $ function_name ) {
296
- $ this ->phpcsFile ->recordMetric ( $ stackPtr , self ::METRIC_NAME , 'param missing ' );
297
-
298
296
// Only display a warning for the functions in which the `$autoload` parameter is optional.
299
297
if ( isset ( $ this ->autoload_is_optional [ $ function_name ] ) ) {
298
+ $ this ->phpcsFile ->recordMetric ( $ stackPtr , self ::METRIC_NAME , 'param missing ' );
299
+
300
300
$ this ->phpcsFile ->addWarning (
301
301
'It is recommended to always pass the `$autoload` parameter when using %s() function. ' ,
302
302
$ stackPtr ,
You can’t perform that action at this time.
0 commit comments