From b7da77096e01fad7e95fd382253cc1e27a76cfcb Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 1 Oct 2024 14:57:15 +0200 Subject: [PATCH] Fix PHPStan --- Yoast/Sniffs/NamingConventions/ValidHookNameSniff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yoast/Sniffs/NamingConventions/ValidHookNameSniff.php b/Yoast/Sniffs/NamingConventions/ValidHookNameSniff.php index ea0274b6..1033458e 100644 --- a/Yoast/Sniffs/NamingConventions/ValidHookNameSniff.php +++ b/Yoast/Sniffs/NamingConventions/ValidHookNameSniff.php @@ -254,7 +254,7 @@ private function verify_yoast_hook_name( $stackPtr, $hook_name_param ) { */ if ( $this->prefix_quote_style === '"' ) { \preg_match_all( '`[\\\\]+`', $this->found_prefix, $matches ); - if ( empty( $matches ) === false ) { + if ( empty( $matches[0] ) === false ) { $counter = 0; foreach ( $matches[0] as $match ) { if ( $match === '\\' ) {