Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenerateMarkdownDoc renders Boolean default values incorrectly #1119

Open
Naktibalda opened this issue Jul 31, 2022 · 0 comments
Open

GenerateMarkdownDoc renders Boolean default values incorrectly #1119

Naktibalda opened this issue Jul 31, 2022 · 0 comments

Comments

@Naktibalda
Copy link
Contributor

Steps to reproduce

I generated markdown of public static function addNamespace(string $prefix, string $baseDir, bool $prepend = false): void

Expected behavior

*public static* addNamespace($prefix, $baseDir, $prepend = false)

Actual behavior

*public static* addNamespace($prefix, $baseDir, $prepend = )

System Configuration

Ubuntu 20.04, PHP 8.0.21

The problem is that GenerateMarkdown uses print_r for rendering default values. print_r is completely unsuitable for printing Boolean values because it renders false as empty string and true as 1.

I think that it would be better to use var_export instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant