mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Allow empty default of 0
for optional parameter in magic method (#880)
Fixes #879 `!= ''` will reject both null and '', but not `0`
This commit is contained in:
parent
5bb5bb2476
commit
66f6d4b1ea
@ -467,7 +467,7 @@ class CommentChecker
|
||||
$args[] = ($method_tree_child->byref ? '&' : '')
|
||||
. ($method_tree_child->variadic ? '...' : '')
|
||||
. $method_tree_child->name
|
||||
. ($method_tree_child->default ? ' = ' . $method_tree_child->default : '');
|
||||
. ($method_tree_child->default != '' ? ' = ' . $method_tree_child->default : '');
|
||||
|
||||
|
||||
if ($method_tree_child->children) {
|
||||
|
Loading…
Reference in New Issue
Block a user