Good day!
If some method has a default Boolean parameter, the error "syntax error, unexpected ','" is thrown.
Example:
public function getMargin(int $stockId, bool $discountless=false, float $cost=0): float {....}
var_export() in buildParameterDefaultValue can fix problem:
$defaultValue .= var_export($parameter->getDefaultValue() ?? 'null',true);
return $defaultValue;