Skip to content

Commit 073c4d5

Browse files
committed
chore: rebuilt classes with grouped use statements
1 parent 645da35 commit 073c4d5

114 files changed

Lines changed: 5794 additions & 4787 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.

src/Command/CreateClassCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ private function getGlobalAttributes(array $allowedGlobalAttributes): string
199199
}
200200

201201
// Sort trait names alphabetically
202-
sort($traitNames, SORT_STRING);
202+
sort($traitNames, \SORT_STRING);
203203

204204
// Generate individual trait use statements (traits cannot use grouped syntax)
205205
$traits = '';
@@ -538,7 +538,7 @@ private function getUseStatements(array $children, array $parents, string $ignor
538538
$className = array_pop($parts);
539539
$namespace = implode('\\', $parts);
540540

541-
if (!isset($grouped[$namespace])) {
541+
if (! isset($grouped[$namespace])) {
542542
$grouped[$namespace] = [];
543543
}
544544
$grouped[$namespace][] = $className;
@@ -547,7 +547,7 @@ private function getUseStatements(array $children, array $parents, string $ignor
547547
// Sort namespaces and classes within each namespace
548548
ksort($grouped);
549549
foreach ($grouped as $namespace => &$classes) {
550-
sort($classes, SORT_STRING);
550+
sort($classes, \SORT_STRING);
551551
}
552552
unset($classes);
553553

@@ -561,7 +561,7 @@ private function getUseStatements(array $children, array $parents, string $ignor
561561
// Grouped use statement
562562
$useStatements .= sprintf("use %s\\{\n", $namespace);
563563
foreach ($classes as $i => $class) {
564-
$useStatements .= sprintf(" %s", $class);
564+
$useStatements .= sprintf(' %s', $class);
565565
$useStatements .= ($i < count($classes) - 1) ? ",\n" : ",\n};\n";
566566
}
567567
}

src/Element/Block/Article.php

Lines changed: 48 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,17 @@
11
<?php
2+
23
/**
34
* This file is auto-generated. Do not edit manually.
45
*
56
* @generated 2025-12-09 15:32:40
6-
* @category HTML
7-
* @package vardumper/extended-htmldocument
87
* @subpackage Html\Element\Block
98
* @link https://vardumper.github.io/extended-htmldocument/
109
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article
1110
*/
11+
1212
namespace Html\Element\Block;
1313

1414
use Html\Element\BlockElement;
15-
use Html\Element\Block\{
16-
Aside,
17-
Audio,
18-
Blockquote,
19-
Body,
20-
DefinitionList,
21-
DeletedText,
22-
Division,
23-
Embed,
24-
Figure,
25-
Form,
26-
Heading1,
27-
Heading2,
28-
Heading3,
29-
Heading4,
30-
Heading5,
31-
Heading6,
32-
InlineFrame,
33-
InsertedText,
34-
Main,
35-
Map,
36-
Navigation,
37-
ObjectElement,
38-
OrderedList,
39-
Paragraph,
40-
Picture,
41-
PreformattedText,
42-
Section,
43-
Table,
44-
UnorderedList,
45-
Video,
46-
};
4715
use Html\Element\Inline\{
4816
Abbreviation,
4917
Anchor,
@@ -84,8 +52,9 @@
8452
AriaRelevantEnum,
8553
RoleEnum,
8654
};
87-
use Html\Trait\GlobalAttribute;
8855
use Html\Mapping\Element;
56+
use Html\Trait\GlobalAttribute;
57+
use InvalidArgumentException;
8958

9059
/**
9160
* The article element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable.
@@ -112,6 +81,7 @@ class Article extends BlockElement
11281
use GlobalAttribute\TabindexTrait;
11382
use GlobalAttribute\TitleTrait;
11483
use GlobalAttribute\TranslateTrait;
84+
11585
/**
11686
* The HTML element name
11787
*/
@@ -137,7 +107,7 @@ class Article extends BlockElement
137107
* @var array<string>
138108
*/
139109
public static array $childOf = [
140-
Article::class,
110+
self::class,
141111
Aside::class,
142112
Blockquote::class,
143113
Body::class,
@@ -156,7 +126,7 @@ class Article extends BlockElement
156126
Anchor::class,
157127
Abbreviation::class,
158128
Area::class,
159-
Article::class,
129+
self::class,
160130
Audio::class,
161131
Bold::class,
162132
BidirectionalIsolation::class,
@@ -209,64 +179,74 @@ class Article extends BlockElement
209179
WordBreakOpportunity::class,
210180
];
211181

212-
213-
/** Defines the semantic purpose of an element for assistive technologies. */
182+
/**
183+
* Defines the semantic purpose of an element for assistive technologies.
184+
*/
214185
protected ?RoleEnum $role = null;
215186

216-
/** Identifies the element(s) whose contents or presence are controlled by this element. Value is a list of IDs separated by a space */
187+
/**
188+
* Identifies the element(s) whose contents or presence are controlled by this element. Value is a list of IDs separated by a space
189+
*/
217190
protected ?string $ariaControls = null;
218191

219-
/** Identifies the element(s) that describes the object. Value is a list of IDs separated by a space */
192+
/**
193+
* Identifies the element(s) that describes the object. Value is a list of IDs separated by a space
194+
*/
220195
protected ?string $ariaDescribedby = null;
221196

222-
/** Identifies the element(s) that labels the current element. Value is a list of IDs separated by a space */
197+
/**
198+
* Identifies the element(s) that labels the current element. Value is a list of IDs separated by a space
199+
*/
223200
protected ?string $ariaLabelledby = null;
224201

225-
/**
202+
/**
226203
* The aria-busy attribute is used to indicate whether an element is currently busy or not.
227-
* @category HTML attribute
228204
* @example false
229205
*/
230206
protected ?AriaBusyEnum $ariaBusy = null;
231207

232-
/** References an element that provides additional details about the current element. */
208+
/**
209+
* References an element that provides additional details about the current element.
210+
*/
233211
protected ?string $ariaDetails = null;
234212

235-
/** Defines keyboard shortcuts available for the element. */
213+
/**
214+
* Defines keyboard shortcuts available for the element.
215+
*/
236216
protected ?string $ariaKeyshortcuts = null;
237217

238-
/** Provides a human-readable custom role description for assistive technologies. */
218+
/**
219+
* Provides a human-readable custom role description for assistive technologies.
220+
*/
239221
protected ?string $ariaRoledescription = null;
240222

241-
/**
223+
/**
242224
* Defines how updates to the element should be announced to screen readers.
243-
* @category HTML attribute
244225
* @example off
245226
*/
246227
protected ?AriaLiveEnum $ariaLive = null;
247228

248-
/**
229+
/**
249230
* Indicates what content changes should be announced in a live region.
250-
* @category HTML attribute
251231
* @example additions text
252232
*/
253233
protected ?AriaRelevantEnum $ariaRelevant = null;
254234

255-
/**
235+
/**
256236
* Indicates whether assistive technologies should present the entire region as a whole when changes occur.
257-
* @category HTML attribute
258237
* @example false
259238
*/
260239
protected ?AriaAtomicEnum $ariaAtomic = null;
261240

262-
/** Establishes ownership relationships between elements. Value is a space-separated list of IDs. */
241+
/**
242+
* Establishes ownership relationships between elements. Value is a space-separated list of IDs.
243+
*/
263244
protected ?string $ariaOwns = null;
264245

265-
266246
public function setRole(string|RoleEnum $role): static
267247
{
268248
if (\is_string($role)) {
269-
$role = RoleEnum::tryFrom($role) ?? throw new \InvalidArgumentException("Invalid value for \$role.");
249+
$role = RoleEnum::tryFrom($role) ?? throw new InvalidArgumentException('Invalid value for $role.');
270250
}
271251
$this->role = $role;
272252
$this->delegated->setAttribute('role', (string) $role->value);
@@ -318,7 +298,9 @@ public function getAriaLabelledby(): ?string
318298
public function setAriaBusy(string|AriaBusyEnum $ariaBusy): static
319299
{
320300
if (\is_string($ariaBusy)) {
321-
$ariaBusy = AriaBusyEnum::tryFrom($ariaBusy) ?? throw new \InvalidArgumentException("Invalid value for \$ariaBusy.");
301+
$ariaBusy = AriaBusyEnum::tryFrom($ariaBusy) ?? throw new InvalidArgumentException(
302+
'Invalid value for $ariaBusy.'
303+
);
322304
}
323305
$this->ariaBusy = $ariaBusy;
324306
$this->delegated->setAttribute('aria-busy', (string) $ariaBusy->value);
@@ -370,7 +352,9 @@ public function getAriaRoledescription(): ?string
370352
public function setAriaLive(string|AriaLiveEnum $ariaLive): static
371353
{
372354
if (\is_string($ariaLive)) {
373-
$ariaLive = AriaLiveEnum::tryFrom($ariaLive) ?? throw new \InvalidArgumentException("Invalid value for \$ariaLive.");
355+
$ariaLive = AriaLiveEnum::tryFrom($ariaLive) ?? throw new InvalidArgumentException(
356+
'Invalid value for $ariaLive.'
357+
);
374358
}
375359
$this->ariaLive = $ariaLive;
376360
$this->delegated->setAttribute('aria-live', (string) $ariaLive->value);
@@ -386,7 +370,9 @@ public function getAriaLive(): ?AriaLiveEnum
386370
public function setAriaRelevant(string|AriaRelevantEnum $ariaRelevant): static
387371
{
388372
if (\is_string($ariaRelevant)) {
389-
$ariaRelevant = AriaRelevantEnum::tryFrom($ariaRelevant) ?? throw new \InvalidArgumentException("Invalid value for \$ariaRelevant.");
373+
$ariaRelevant = AriaRelevantEnum::tryFrom($ariaRelevant) ?? throw new InvalidArgumentException(
374+
'Invalid value for $ariaRelevant.'
375+
);
390376
}
391377
$this->ariaRelevant = $ariaRelevant;
392378
$this->delegated->setAttribute('aria-relevant', (string) $ariaRelevant->value);
@@ -402,7 +388,9 @@ public function getAriaRelevant(): ?AriaRelevantEnum
402388
public function setAriaAtomic(string|AriaAtomicEnum $ariaAtomic): static
403389
{
404390
if (\is_string($ariaAtomic)) {
405-
$ariaAtomic = AriaAtomicEnum::tryFrom($ariaAtomic) ?? throw new \InvalidArgumentException("Invalid value for \$ariaAtomic.");
391+
$ariaAtomic = AriaAtomicEnum::tryFrom($ariaAtomic) ?? throw new InvalidArgumentException(
392+
'Invalid value for $ariaAtomic.'
393+
);
406394
}
407395
$this->ariaAtomic = $ariaAtomic;
408396
$this->delegated->setAttribute('aria-atomic', (string) $ariaAtomic->value);
@@ -426,6 +414,4 @@ public function getAriaOwns(): ?string
426414
{
427415
return $this->ariaOwns;
428416
}
429-
430-
431417
}

0 commit comments

Comments
 (0)