Skip to content

Commit 7a6ff9e

Browse files
committed
🐛 Argument value ignored when is 0 (zero)
1 parent 879ace7 commit 7a6ff9e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

data/templates/vuepress/member-method.md.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{{ method.visibility }}{% if method.static %} static{% endif %} {{ method.name }}( {% for argument in method.arguments %}
2020
{{- argument.types|default(['mixed'])|sort_asc|join('|')~' ' }}
2121
{{- argument.byReference ? '&' }}
22-
{{- argument.name }}{% if argument.default %} = {{ argument.default|raw }}{% endif %}
22+
{{- argument.name }}{% if argument.default is not same as(null) %} = {{ argument.default|raw }}{% endif %}
2323
{%- if not loop.last %}, {% endif -%}
2424
{%- endfor -%}
2525
{{- ' ) : ' ~ method.response.types|default('void')|join('|') }}
@@ -29,7 +29,7 @@
2929
| Parameter | Type(s) | Description |
3030
|-----------|------|-------------|
3131
{% for argument in method.arguments %}
32-
| `{{ argument.name }}` {% if argument.default %}<Badge text="optional" type="warn"/>{% endif -%}
32+
| `{{ argument.name }}` {% if argument.default is not same as(null) %}<Badge text="optional" type="warn"/>{% endif -%}
3333
| **`{{ argument.types|default(['mixed'])|sort_asc|join('`** <br /> **`')|raw }}`** | {{ argument.description|replace({'|': '&#124;', "\n": ' ', "\r": ' '})|raw }} |
3434
{% endfor %}
3535
{% endif %}{# method.arguments is not empty #}

data/templates/vuepress/member-property.md.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{# property signature #}
1919
```php
2020
{{ property.visibility }}{% if property.static %} static{% endif %} ${{ property.name }}
21-
{%- if property.default %} = {{ property.default|raw }}{% endif %};
21+
{%- if property.default is not same as(null) %} = {{ property.default|raw }}{% endif %};
2222
```
2323

2424
***Types:***

0 commit comments

Comments
 (0)