Skip to content

Commit

Permalink
Ignore specific PHP Code Sniffer warnings for audio node checks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
attackant committed Oct 31, 2023
1 parent b2ce921 commit 7818b1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/apple-exporter/components/class-audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7818b1a

Please sign in to comment.