Skip to content

Commit

Permalink
Drop double \ from parameter types (#445)
Browse files Browse the repository at this point in the history
Currently the generation of files is failing due to ?\\DateTimeZone in a nullable parameter on at least one function. This changeset fixes that a bit crudely but effectively.
  • Loading branch information
WyriHaximus authored Nov 28, 2024
1 parent d15d3ac commit 8ebff34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/src/WritePhpFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private function displayParamsWithType(array $params): string
$paramsAsString[] = $paramAsString;
}

return implode(', ', $paramsAsString);
return str_replace('\\\\', '\\', implode(', ', $paramsAsString));
}

private function printFunctionCall(Method $function): string
Expand Down

0 comments on commit 8ebff34

Please sign in to comment.