protected function renderMethodParameters($method)
    {
        $parameters = [];

        foreach ($method->getParameters() as $parameter) {
            if ($parameter->isPassedByReference()) {
                throw new InvalidArgumentException(sprintf(
                    'Parameter [%s] in %s->%s cannot declared as a reference.',
                    $parameter->getName(), $method->getDeclaringClass(), $method->getName()
                ));
            }

            $definition = $this->renderParameterTypeHint($parameter);
            $definition .= $parameter->isVariadic() ? '...' : '';
            $definition .= '$'.$parameter->getName();

            if (! $parameter->isVariadic()) {
                if ($parameter->isDefaultValueAvailable()) {
                    $definition .= ' = '.var_export($parameter->getDefaultValue(), true);
                } elseif ($parameter->isOptional()) {
                    $definition .= ' = null';
                }
            }

            $parameters[] = $definition;
        }

        return '('.implode(', ', $parameters).')';
    }