Skip to content

Commit 4d14ee1

Browse files
committed
Fix detection of custom rendering after array in method calls
Should only try and concatenate line if first line is custom
1 parent c071774 commit 4d14ee1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CodeHelper/MethodParamsTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ private function getSourceForParams(): array
163163
else {
164164
foreach ($param->getSourceArray() as $v) {
165165
$return[] = $v;
166+
$currentIndex += 1;
166167
}
167-
$currentIndex += 1;
168168
}
169169
$previousArray = true;
170170
continue;
@@ -179,7 +179,7 @@ private function getSourceForParams(): array
179179
if (!is_scalar($tmpValue)) {
180180
throw InvalidCode::invalidType();
181181
}
182-
if ($return[$currentIndex - 1] !== '[') {
182+
if (!$noCustomFirstLine && $return[$currentIndex - 1] !== '[') {
183183
$return[$currentIndex - 1] .= ', ' . $tmpValue;
184184
}
185185
else {

0 commit comments

Comments
 (0)