Skip to content

Commit

Permalink
Further reduce duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
fredden committed May 26, 2023
1 parent 0f21272 commit 17ccd06
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
31 changes: 0 additions & 31 deletions Magento2/Sniffs/Html/HtmlClosingVoidTagsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,6 @@ class HtmlClosingVoidTagsSniff extends HtmlSelfClosingTagsSniff implements Sniff
*/
private const WARNING_CODE = 'HtmlClosingVoidElements';

/**
* List of void elements.
*
* https://html.spec.whatwg.org/multipage/syntax.html#void-elements
*
* @var string[]
*/
private const HTML_VOID_ELEMENTS = [
'area',
'base',
'br',
'col',
'embed',
'hr',
'img',
'input',
'link',
'meta',
'source',
'track',
'wbr',
];

/**
* @inheritdoc
*/
public function register(): array
{
return [T_INLINE_HTML];
}

/**
* Detect use of self-closing tag with void html element.
*
Expand Down
2 changes: 1 addition & 1 deletion Magento2/Sniffs/Html/HtmlSelfClosingTagsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class HtmlSelfClosingTagsSniff implements Sniff
*
* @var string[]
*/
private const HTML_VOID_ELEMENTS = [
protected const HTML_VOID_ELEMENTS = [
'area',
'base',
'br',
Expand Down

0 comments on commit 17ccd06

Please sign in to comment.