Skip to content

Commit 611cebb

Browse files
authored
1 parent 9a62502 commit 611cebb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Function.HTML-Build-Attributes.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
*/
1313
function html_build_attributes( array $attr, callable $callback = null )
1414
{
15-
if ( ! count($attr) ) {
16-
return '';
17-
}
15+
if ( ! count($attr) ) {
16+
return '';
17+
}
1818

1919
$html = array_map(
2020
function ( $val, $key ) use ( $callback ) {
@@ -24,11 +24,11 @@ function ( $val, $key ) use ( $callback ) {
2424
if ( $val instanceof \Closure ) {
2525
$val = $val();
2626
} elseif ( $val instanceof \JsonSerializable ) {
27-
$val = json_encode(
28-
$val->jsonSerialize(),
29-
(JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE)
30-
);
31-
} elseif ( is_callable( [ $val, 'toArray' ] ) ) {
27+
$val = json_encode(
28+
$val->jsonSerialize(),
29+
(JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE)
30+
);
31+
} elseif ( is_callable( [ $val, 'toArray' ] ) ) {
3232
$val = $val->toArray();
3333
} elseif ( is_callable( [ $val, '__toString' ] ) ) {
3434
$val = strval( $val );

0 commit comments

Comments
 (0)