Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 17ccd06

Browse files
committed
Further reduce duplicate code
1 parent 0f21272 commit 17ccd06

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed

‎Magento2/Sniffs/Html/HtmlClosingVoidTagsSniff.php‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,37 +30,6 @@ class HtmlClosingVoidTagsSniff extends HtmlSelfClosingTagsSniff implements Sniff
3030
*/
3131
private const WARNING_CODE = 'HtmlClosingVoidElements';
3232

33-
/**
34-
* List of void elements.
35-
*
36-
* https://html.spec.whatwg.org/multipage/syntax.html#void-elements
37-
*
38-
* @var string[]
39-
*/
40-
private const HTML_VOID_ELEMENTS = [
41-
'area',
42-
'base',
43-
'br',
44-
'col',
45-
'embed',
46-
'hr',
47-
'img',
48-
'input',
49-
'link',
50-
'meta',
51-
'source',
52-
'track',
53-
'wbr',
54-
];
55-
56-
/**
57-
* @inheritdoc
58-
*/
59-
public function register(): array
60-
{
61-
return [T_INLINE_HTML];
62-
}
63-
6433
/**
6534
* Detect use of self-closing tag with void html element.
6635
*

‎Magento2/Sniffs/Html/HtmlSelfClosingTagsSniff.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class HtmlSelfClosingTagsSniff implements Sniff
2323
*
2424
* @var string[]
2525
*/
26-
private const HTML_VOID_ELEMENTS = [
26+
protected const HTML_VOID_ELEMENTS = [
2727
'area',
2828
'base',
2929
'br',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /