Skip to content

Commit

Permalink
chore(docs.tmpl): make collaspible. add throws. fix return/param
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Sep 20, 2018
1 parent a8898a6 commit ef48c80
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions resources/docs/docs.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,24 @@ use {{class.classFqcn}};
> {{method.title}}
{% endif %}

<details><summary>Details …</summary>
<div>

```php
{{method.isStatic ? '::' : ''}}{{name}}({{method.params|join(', ')}}){{method.return ? ': ' ~ method.return : ''}}
{% set params = call('array_column', method.params, 0) %}
{{method.isStatic ? '::' : ''}}{{name}}({{params|join(', ')}}){{method.return ? ': ' ~ method.return[0] : ''}}
```
{% if method.texts %}

{{method.texts|join("\n")|replace({'<code>':"```php",'</code>':"```"})|raw}}
{{method.texts|join("\n\n")|replace({'<code>':"```php", '</code>':"```"})|raw|nl2br}}
{% endif %}
{% if method.throws %}

> _Throws_ **{{method.throws[0]}}** {{ method.throws[1] ? '_' ~ method.throws[1] ~ '_' : '' }}
{% endif %}

</div>
</details>
{% endfor %}

**[⬆ back to top](#the-top)**
Expand Down

0 comments on commit ef48c80

Please sign in to comment.