We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
param missing
1 parent e3ae1c3 commit f80b867Copy full SHA for f80b867
1 file changed
WordPress/Sniffs/WP/OptionAutoloadSniff.php
@@ -293,10 +293,10 @@ private function handle_wp_set_option_autoload_values( array $options_param ) {
293
* @return void
294
*/
295
private function maybe_display_missing_autoload_warning( $stackPtr, $function_name ) {
296
- $this->phpcsFile->recordMetric( $stackPtr, self::METRIC_NAME, 'param missing' );
297
-
298
// Only display a warning for the functions in which the `$autoload` parameter is optional.
299
if ( isset( $this->autoload_is_optional[ $function_name ] ) ) {
+ $this->phpcsFile->recordMetric( $stackPtr, self::METRIC_NAME, 'param missing' );
+
300
$this->phpcsFile->addWarning(
301
'It is recommended to always pass the `$autoload` parameter when using %s() function.',
302
$stackPtr,
0 commit comments