Skip to content

Commit a548f20

Browse files
committed
fix: twig - remove line break in element without attributes
1 parent 3403c6a commit a548f20

230 files changed

Lines changed: 1666 additions & 2753 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/phpmd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ layout: home
1313
## Design
1414

1515

16-
Fri Oct 31 11:00:21 PM CET 2025
16+
Fri Oct 31 11:03:57 PM CET 2025

src/Element/Block/Article.php

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,19 @@
11
<?php
2+
23
/**
34
* This file is auto-generated. Do not edit manually.
45
*
56
* Article - The article element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable.
6-
*
7+
*
78
* @generated 2025-10-31 21:58:00
8-
* @category HTML
9-
* @package vardumper/extended-htmldocument
109
* @subpackage Html\Element\Block
1110
* @link https://vardumper.github.io/extended-htmldocument/
1211
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article
1312
*/
13+
1414
namespace Html\Element\Block;
1515

1616
use Html\Element\BlockElement;
17-
use Html\Element\Block\Aside;
18-
use Html\Element\Block\Audio;
19-
use Html\Element\Block\Blockquote;
20-
use Html\Element\Block\Body;
21-
use Html\Element\Block\DefinitionList;
22-
use Html\Element\Block\DeletedText;
23-
use Html\Element\Block\Division;
24-
use Html\Element\Block\Embed;
25-
use Html\Element\Block\Figure;
26-
use Html\Element\Block\Form;
27-
use Html\Element\Block\Heading1;
28-
use Html\Element\Block\Heading2;
29-
use Html\Element\Block\Heading3;
30-
use Html\Element\Block\Heading4;
31-
use Html\Element\Block\Heading5;
32-
use Html\Element\Block\Heading6;
33-
use Html\Element\Block\InlineFrame;
34-
use Html\Element\Block\InsertedText;
35-
use Html\Element\Block\Main;
36-
use Html\Element\Block\Map;
37-
use Html\Element\Block\Navigation;
38-
use Html\Element\Block\ObjectElement;
39-
use Html\Element\Block\OrderedList;
40-
use Html\Element\Block\Paragraph;
41-
use Html\Element\Block\Picture;
42-
use Html\Element\Block\PreformattedText;
43-
use Html\Element\Block\Section;
44-
use Html\Element\Block\Table;
45-
use Html\Element\Block\UnorderedList;
46-
use Html\Element\Block\Video;
4717
use Html\Element\Inline\Abbreviation;
4818
use Html\Element\Inline\Anchor;
4919
use Html\Element\Inline\BidirectionalIsolation;
@@ -73,6 +43,7 @@
7343
use Html\Element\Void\Area;
7444
use Html\Element\Void\BreakElement;
7545
use Html\Element\Void\WordBreakOpportunity;
46+
use Html\Mapping\Element;
7647
use Html\Trait\GlobalAttribute\AccesskeyTrait;
7748
use Html\Trait\GlobalAttribute\AutocapitalizeTrait;
7849
use Html\Trait\GlobalAttribute\AutofocusTrait;
@@ -90,12 +61,11 @@
9061
use Html\Trait\GlobalAttribute\TabindexTrait;
9162
use Html\Trait\GlobalAttribute\TitleTrait;
9263
use Html\Trait\GlobalAttribute\TranslateTrait;
93-
use Html\Mapping\Element;
9464

9565
#[Element('article')]
9666
class Article extends BlockElement
9767
{
98-
use AccesskeyTrait;
68+
use AccesskeyTrait;
9969

10070
use AutocapitalizeTrait;
10171

@@ -128,6 +98,7 @@ class Article extends BlockElement
12898
use TitleTrait;
12999

130100
use TranslateTrait;
101+
131102
/**
132103
* The HTML element name
133104
*/
@@ -153,7 +124,7 @@ class Article extends BlockElement
153124
* @var array<string>
154125
*/
155126
public static array $childOf = [
156-
Article::class,
127+
self::class,
157128
Aside::class,
158129
Blockquote::class,
159130
Body::class,
@@ -172,7 +143,7 @@ class Article extends BlockElement
172143
Anchor::class,
173144
Abbreviation::class,
174145
Area::class,
175-
Article::class,
146+
self::class,
176147
Audio::class,
177148
Bold::class,
178149
BidirectionalIsolation::class,
@@ -224,8 +195,4 @@ class Article extends BlockElement
224195
Video::class,
225196
WordBreakOpportunity::class,
226197
];
227-
228-
229-
230-
231198
}

src/Element/Block/Aside.php

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,19 @@
11
<?php
2+
23
/**
34
* This file is auto-generated. Do not edit manually.
45
*
56
* Aside - The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content.
6-
*
7+
*
78
* @generated 2025-10-31 21:58:00
8-
* @category HTML
9-
* @package vardumper/extended-htmldocument
109
* @subpackage Html\Element\Block
1110
* @link https://vardumper.github.io/extended-htmldocument/
1211
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside
1312
*/
13+
1414
namespace Html\Element\Block;
1515

1616
use Html\Element\BlockElement;
17-
use Html\Element\Block\Article;
18-
use Html\Element\Block\Audio;
19-
use Html\Element\Block\Body;
20-
use Html\Element\Block\DefinitionDescription;
21-
use Html\Element\Block\DefinitionList;
22-
use Html\Element\Block\DefinitionTerm;
23-
use Html\Element\Block\DeletedText;
24-
use Html\Element\Block\Details;
25-
use Html\Element\Block\Division;
26-
use Html\Element\Block\Embed;
27-
use Html\Element\Block\Figure;
28-
use Html\Element\Block\FigureCaption;
29-
use Html\Element\Block\Heading1;
30-
use Html\Element\Block\Heading2;
31-
use Html\Element\Block\Heading3;
32-
use Html\Element\Block\Heading4;
33-
use Html\Element\Block\Heading5;
34-
use Html\Element\Block\Heading6;
35-
use Html\Element\Block\InlineFrame;
36-
use Html\Element\Block\InsertedText;
37-
use Html\Element\Block\ListItem;
38-
use Html\Element\Block\Main;
39-
use Html\Element\Block\Map;
40-
use Html\Element\Block\ObjectElement;
41-
use Html\Element\Block\OrderedList;
42-
use Html\Element\Block\Paragraph;
43-
use Html\Element\Block\Picture;
44-
use Html\Element\Block\PreformattedText;
45-
use Html\Element\Block\Summary;
46-
use Html\Element\Block\Table;
47-
use Html\Element\Block\UnorderedList;
48-
use Html\Element\Block\Video;
4917
use Html\Element\Inline\Abbreviation;
5018
use Html\Element\Inline\Anchor;
5119
use Html\Element\Inline\BidirectionalIsolation;
@@ -84,6 +52,7 @@
8452
use Html\Element\Void\Source;
8553
use Html\Element\Void\Track;
8654
use Html\Element\Void\WordBreakOpportunity;
55+
use Html\Mapping\Element;
8756
use Html\Trait\GlobalAttribute\AccesskeyTrait;
8857
use Html\Trait\GlobalAttribute\AutocapitalizeTrait;
8958
use Html\Trait\GlobalAttribute\AutofocusTrait;
@@ -101,12 +70,11 @@
10170
use Html\Trait\GlobalAttribute\TabindexTrait;
10271
use Html\Trait\GlobalAttribute\TitleTrait;
10372
use Html\Trait\GlobalAttribute\TranslateTrait;
104-
use Html\Mapping\Element;
10573

10674
#[Element('aside')]
10775
class Aside extends BlockElement
10876
{
109-
use AccesskeyTrait;
77+
use AccesskeyTrait;
11078

11179
use AutocapitalizeTrait;
11280

@@ -139,6 +107,7 @@ class Aside extends BlockElement
139107
use TitleTrait;
140108

141109
use TranslateTrait;
110+
142111
/**
143112
* The HTML element name
144113
*/
@@ -163,12 +132,7 @@ class Aside extends BlockElement
163132
* The list of allowed direct parents. Any if empty.
164133
* @var array<string>
165134
*/
166-
public static array $childOf = [
167-
Body::class,
168-
Division::class,
169-
Main::class,
170-
Paragraph::class,
171-
];
135+
public static array $childOf = [Body::class, Division::class, Main::class, Paragraph::class];
172136

173137
/**
174138
* The list of allowed direct children. Any if empty.s
@@ -244,8 +208,4 @@ class Aside extends BlockElement
244208
Video::class,
245209
WordBreakOpportunity::class,
246210
];
247-
248-
249-
250-
251211
}

src/Element/Block/Audio.php

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
11
<?php
2+
23
/**
34
* This file is auto-generated. Do not edit manually.
45
*
56
* Audio - The audio element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the source element.
6-
*
7+
*
78
* @generated 2025-10-31 21:58:00
8-
* @category HTML
9-
* @package vardumper/extended-htmldocument
109
* @subpackage Html\Element\Block
1110
* @link https://vardumper.github.io/extended-htmldocument/
1211
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
1312
*/
13+
1414
namespace Html\Element\Block;
1515

1616
use Html\Element\BlockElement;
17-
use Html\Element\Block\Article;
18-
use Html\Element\Block\Aside;
19-
use Html\Element\Block\Body;
20-
use Html\Element\Block\DefinitionDescription;
21-
use Html\Element\Block\Division;
22-
use Html\Element\Block\Footer;
23-
use Html\Element\Block\Header;
24-
use Html\Element\Block\Main;
25-
use Html\Element\Block\Paragraph;
26-
use Html\Element\Block\Section;
2717
use Html\Element\Inline\MarkedText;
2818
use Html\Enum\CrossoriginEnum;
2919
use Html\Enum\PreloadEnum;
20+
use Html\Mapping\Element;
3021
use Html\Trait\GlobalAttribute\AccesskeyTrait;
3122
use Html\Trait\GlobalAttribute\ClassTrait;
3223
use Html\Trait\GlobalAttribute\DataTrait;
@@ -38,12 +29,12 @@
3829
use Html\Trait\GlobalAttribute\TabindexTrait;
3930
use Html\Trait\GlobalAttribute\TitleTrait;
4031
use Html\Trait\GlobalAttribute\TranslateTrait;
41-
use Html\Mapping\Element;
32+
use InvalidArgumentException;
4233

4334
#[Element('audio')]
4435
class Audio extends BlockElement
4536
{
46-
use AccesskeyTrait;
37+
use AccesskeyTrait;
4738

4839
use ClassTrait;
4940

@@ -64,6 +55,7 @@ class Audio extends BlockElement
6455
use TitleTrait;
6556

6657
use TranslateTrait;
58+
6759
/**
6860
* The HTML element name
6961
*/
@@ -106,36 +98,41 @@ class Audio extends BlockElement
10698
* The list of allowed direct children. Any if empty.s
10799
* @var array<string>
108100
*/
109-
public static array $parentOf = [
110-
];
111-
101+
public static array $parentOf = [];
112102

113-
/** When present, it specifies that the audio or video will automatically start playing as soon as it can do so without stopping. */
103+
/**
104+
* When present, it specifies that the audio or video will automatically start playing as soon as it can do so without stopping.
105+
*/
114106
public ?bool $autoplay = null;
115107

116-
/** When present, it specifies that audio or video controls should be displayed (such as play, pause, and volume). */
108+
/**
109+
* When present, it specifies that audio or video controls should be displayed (such as play, pause, and volume).
110+
*/
117111
public ?bool $controls = null;
118112

119-
/** Specifies how the element handles cross-origin requests. */
113+
/**
114+
* Specifies how the element handles cross-origin requests.
115+
*/
120116
public ?CrossoriginEnum $crossorigin = null;
121117

122-
/** When present, it specifies that the audio or video will start over again every time it is finished. */
118+
/**
119+
* When present, it specifies that the audio or video will start over again every time it is finished.
120+
*/
123121
public ?bool $loop = null;
124122

125-
/** When present, it specifies that the audio output of the video should be muted. */
123+
/**
124+
* When present, it specifies that the audio output of the video should be muted.
125+
*/
126126
public ?bool $muted = null;
127127

128-
/** */
129128
public ?PreloadEnum $preload = null;
130129

131-
/**
130+
/**
132131
* Specifies the URL of the external resource to be embedded or referenced.
133-
* @category HTML attribute
134132
* @required
135133
*/
136134
public ?string $src = null;
137135

138-
139136
public function setAutoplay(bool $autoplay): static
140137
{
141138
$this->autoplay = $autoplay;
@@ -163,7 +160,9 @@ public function getControls(): ?bool
163160
public function setCrossorigin(string|CrossoriginEnum $crossorigin): static
164161
{
165162
if (is_string($crossorigin)) {
166-
$crossorigin = CrossoriginEnum::tryFrom($crossorigin) ?? throw new \InvalidArgumentException("Invalid value for \$crossorigin.");
163+
$crossorigin = CrossoriginEnum::tryFrom($crossorigin) ?? throw new InvalidArgumentException(
164+
'Invalid value for $crossorigin.'
165+
);
167166
}
168167
$this->crossorigin = $crossorigin;
169168
$this->delegated->setAttribute('crossorigin', (string) $crossorigin->value);
@@ -203,7 +202,9 @@ public function getMuted(): ?bool
203202
public function setPreload(string|PreloadEnum $preload): static
204203
{
205204
if (is_string($preload)) {
206-
$preload = PreloadEnum::tryFrom($preload) ?? throw new \InvalidArgumentException("Invalid value for \$preload.");
205+
$preload = PreloadEnum::tryFrom($preload) ?? throw new InvalidArgumentException(
206+
'Invalid value for $preload.'
207+
);
207208
}
208209
$this->preload = $preload;
209210
$this->delegated->setAttribute('preload', (string) $preload->value);
@@ -227,6 +228,4 @@ public function getSrc(): ?string
227228
{
228229
return $this->src;
229230
}
230-
231-
232231
}

0 commit comments

Comments
 (0)