Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Nov 27, 2024
1 parent 58bdb95 commit 744844f
Show file tree
Hide file tree
Showing 4 changed files with 641 additions and 92 deletions.
10 changes: 8 additions & 2 deletions bin/gen_callmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function assertEntryParameters(ReflectionFunctionAbstract $function, array &$ent
*/
$normalizedEntries = [];

foreach ($entryParameters as $key => $entry) {
foreach ($entryParameters as $key => &$entry) {
if ($key === 0) {
continue;
}
Expand All @@ -57,7 +57,7 @@ function assertEntryParameters(ReflectionFunctionAbstract $function, array &$ent
'variadic' => false,
'byRef' => false,
'optional' => false,
'type' => $entry,
'type' => &$entry,
];
if (strncmp($normalizedKey, '&', 1) === 0) {
$normalizedEntry['byRef'] = true;
Expand Down Expand Up @@ -92,6 +92,12 @@ function assertEntryParameters(ReflectionFunctionAbstract $function, array &$ent
$normalizedEntry['name'] = $normalizedKey;
$normalizedEntries[$normalizedKey] = $normalizedEntry;
}

foreach ($function->getParameters() as $parameter) {
if (isset($normalizedEntries[$parameter->getName()])) {
assertParameter($normalizedEntries[$parameter->getName()], $parameter);
}
}
}

/**
Expand Down
Loading

0 comments on commit 744844f

Please sign in to comment.