From 7818b1aa3bf8d6e108b875fed7af35bd1e995fb9 Mon Sep 17 00:00:00 2001 From: Damian Taggart <4309872+attackant@users.noreply.github.com> Date: Tue, 31 Oct 2023 09:31:03 -0600 Subject: [PATCH] Ignore specific PHP Code Sniffer warnings for audio node checks This change was necessary to ensure the codebase conforms to the WordPress Naming Conventions. Comments were added to ignore PHP Code Sniffer warnings about non-snake case variables when checking if a node is an 'audio' node. This had to be done since those checks are part of the application's logic --- includes/apple-exporter/components/class-audio.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/apple-exporter/components/class-audio.php b/includes/apple-exporter/components/class-audio.php index 6d53e7c2..6cf7ffe7 100644 --- a/includes/apple-exporter/components/class-audio.php +++ b/includes/apple-exporter/components/class-audio.php @@ -31,10 +31,10 @@ public static function node_matches( $node ) { // Is this a gutenberg audio block? ( self::node_has_class( $node, 'wp-block-audio' ) && $node->hasChildNodes() - && 'audio' === $node->firstChild->nodeName + && 'audio' === $node->firstChild->nodeName // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase ) // Or is this a stand-alone audio tag? - || 'audio' === $node->nodeName + || 'audio' === $node->nodeName // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase ) { return $node; }