Skip to content

Commit f33a682

Browse files
committed
format
1 parent 244c3d8 commit f33a682

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

gen.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ function generateNormalElement(string $funcName, string $tag): string
175175
function $funcName(
176176
$phpAttrsType|$childType \$arg0 = [],
177177
$childType ...\$args,
178-
): HTMLElement
179-
{
178+
): HTMLElement {
180179
return new HTMLElement("$tag", [\$arg0, ...\$args]);
181180
}
182181
EOD;
@@ -189,8 +188,7 @@ function generateSelfClosingElement(string $funcName, string $tag): string
189188
/** @param $attrsType \$attrs */
190189
function $funcName(
191190
$phpAttrsType \$attrs = [],
192-
): SelfClosingHTMLElement
193-
{
191+
): SelfClosingHTMLElement {
194192
return new SelfClosingHTMLElement("$tag", \$attrs);
195193
}
196194
EOD;

tests/Types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use function MicroHTML\{P, IMG};
88

99
P(["class" => "foo"]); // attributes allowed in first argument
10-
P("words", ["property"=>"array"]); // @phpstan-ignore-line - attributes not allowed in any other argument
10+
P("words", ["property" => "array"]); // @phpstan-ignore-line - attributes not allowed in any other argument
1111
P(["foo", "bar", "baz"]); // @phpstan-ignore-line - attribute arrays must be string=>string
1212
P(P(), P()); // multiple children allowed
1313
P([P(), P()]); // @phpstan-ignore-line - no arrays-of-children allowed

0 commit comments

Comments
 (0)