<a id="method_{{ method.name }}"></a>
<article
        class="
            phpdocumentor-method
            phpdocumentor-method--{{ method.visibility }}
            {% if method.deprecated %}phpdocumentor-element--deprecated{% endif %}
            {% if method.abstract %}phpdocumentor-element--abstract{% endif %}
            {% if method.static %}phpdocumentor-element--static{% endif %}
            {% if method.final %}phpdocumentor-element--final{% endif %}
        "
>
    <h4 class="phpdocumentor-method__name">{{ method.name }}()</h4>
    <aside class="phpdocumentor-element-found-in">
        <abbr class="phpdocumentor-element-found-in__file" title="{{ method.file.path }}">{{ method.file|route('file:short') }}</abbr>
        :
        <span class="phpdocumentor-element-found-in__line">{{ method.line }}</span>
    </aside>
    {% if method.summary %}
    <p class="phpdocumentor-summary">{{ method.summary }}</p>
    {% endif %}
    <code class="phpdocumentor-signature phpdocumentor-code {% if method.deprecated %}phpdocumentor-signature--deprecated{% endif %}">
        <span class="phpdocumentor-signature__visibility">{{ method.visibility }}</span>
        {% if method.abstract %}<span class="phpdocumentor-signature__abstract">abstract</span>{% endif %}
        {% if method.final %}<span class="phpdocumentor-signature__final">final</span>{% endif %}
        {% if method.static %}<span class="phpdocumentor-signature__static">static</span>{% endif %}
        <span class="phpdocumentor-signature__name">{{ method.name }}</span>(
        {% for argument in method.arguments %}
            <span class="phpdocumentor-signature__argument">
            {% if argument.default %}[{% endif %}{% if not loop.first %}, {% endif %}
                {% if argument.isVariadic %}<span class="phpdocumentor-signature__argument__variadic-operator">...</span>{% endif %}
                {%- if argument.byReference -%}<span class="phpdocumentor-signature__argument__reference-operator">&amp;</span>{%- endif -%}
                <span class="phpdocumentor-signature__argument__name">${{ argument.name }}</span> :
                <span class="phpdocumentor-signature__argument__return-type">{{ argument.type|route('class:short')|join('|')|raw }}</span>
                {% if argument.default %} = <span class="phpdocumentor-signature__argument__default-value">{{ argument.default }}</span> ]{% endif %}
            </span>
        {% endfor %}
        )
        : <span class="phpdocumentor-signature__response_type">{{ method.response.type|route('class:short')|join('|')|raw }}</span>
    </code>

    {% if method.description %}
    <section class="phpdocumentor-description">{{ method.description|markdown }}</section>
    {% endif %}

    {% if method.arguments|length > 0 %}
        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
        <dl class="phpdocumentor-argument-list">
            {% for argument in method.arguments %}
                <dt class="phpdocumentor-argument-list__entry">
                    <span class="phpdocumentor-signature__argument__name">${{ argument.name }}</span>
                    : <span class="phpdocumentor-signature__argument__return-type">{{ argument.type|route('class:short')|join('|')|raw }}</span>
                    {% if argument.default %} = <span class="phpdocumentor-signature__argument__default-value">{{ argument.default }}</span>{% endif %}
                </dt>
                <dd class="phpdocumentor-argument-list__definition"><section class="phpdocumentor-description">{{ argument.description|default('')|markdown }}</section></dd>
            {% endfor %}
        </dl>
    {% endif %}

    {% set visibleTags = method.tags|filter((v,k) => k not in ['param', 'return']) %}
    {{ include ('tags.html.twig', {tags: visibleTags}) }}

    {% if (method.response.type and method.response.type != 'void') or method.response.description %}
        <h5 class="phpdocumentor-return-value__heading">Return values</h5>
        <span class="phpdocumentor-signature__response_type">{{ method.response.type|route('class:short')|join('|')|raw }}</span>
        {% if method.response.description %}
            &mdash; <span class="phpdocumentor-description">{{ method.response.description|markdown }}</span>
        {% endif %}
    {% endif %}

</article>
