PhpBench\Extensions\XDebug\Renderer\TraceRenderer::renderFunction PHP Method

renderFunction() private method

private renderFunction ( DOMNode $entryEl, $padding, array $options )
$entryEl DOMNode
$options array
    private function renderFunction(\DOMNode $entryEl, $padding, array $options)
    {
        $function = $entryEl->getAttribute('function');
        $args = [];
        foreach ($entryEl->query('./arg') as $argEl) {
            $argString = $this->truncate->format($argEl->nodeValue, array_merge($this->truncate->getDefaultOptions(), ['length' => 100]));
            $args[] = str_replace("\n", '', $argString);
        }
        if ($options['show_args'] && $args) {
            return sprintf('%s%s(%s', $pad = str_repeat(' ', $padding), $function, "\n" . $pad . ' ' . implode("\n" . $pad . ' ', $args) . "\n" . $pad . '</>)');
        }
        return sprintf('%s%s()', $pad = str_repeat(' ', $padding), $function);
    }