Skip to content

Commit ba9494e

Browse files
committed
UIMacros: formatArray() is deprecated
1 parent a61d596 commit ba9494e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Bridges/ApplicationLatte/UIMacros.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ public function macroControl(MacroNode $node, PhpWriter $writer)
6969
$name = $writer->formatWord($words[0]);
7070
$method = isset($words[1]) ? ucfirst($words[1]) : '';
7171
$method = Strings::match($method, '#^\w*\z#') ? "render$method" : "{\"render$method\"}";
72-
$param = $writer->formatArray();
73-
if (!Strings::contains($node->args, '=>')) {
74-
$param = substr($param, $param[0] === '[' ? 1 : 6, -1); // removes array() or []
72+
$param = $writer->formatArgs();
73+
if (Strings::contains($node->args, '=>')) {
74+
$param = "[$param]";
7575
}
7676
return ($name[0] === '$' ? "if (is_object($name)) \$_l->tmp = $name; else " : '')
7777
. '$_l->tmp = $_control->getComponent(' . $name . '); '

0 commit comments

Comments
 (0)