Skip to content

Commit

Permalink
Починил обработку массивов
Browse files Browse the repository at this point in the history
  • Loading branch information
mag310 committed May 28, 2018
1 parent 1da1cd6 commit 83b390c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ private function simplifyParams($params)
if (isset($value[0]) && isset($value[1])) {
$newParams[$key] = [$value[0], $value[1]];
} elseif (isset($value[0])) {
$newParams[$key] = $value[0];
if (is_array($value[0])) {
foreach ($value[0] as $valKey => $valVal) {
$newParams[$key . '_' . $valKey] = $valVal;
}
} else {
$newParams[$key] = $value[0];
}
}
} elseif ($value['bind'] === 'tuple') {

Expand Down Expand Up @@ -113,7 +119,6 @@ private function simplifyParams($params)
$newParams[$key] = $value;
}
}

return $newParams;
}

Expand Down

0 comments on commit 83b390c

Please sign in to comment.