src/SignatureInformationFactory.php
private function createParameters(FunctionLike $node): array
    {
        $params = [];
        if ($node->parameters) {
            foreach ($node->parameters->getElements() as $element) {
                $param = (string) $this->definitionResolver->getTypeFromNode($element);
                $param .= ' ';
                if ($element->dotDotDotToken) {
                    $param .= '...';
                }
                $param .= '$' . $element->getName();
                if ($element->default) {
                    $param .= ' = ' . $element->default->getText();
                }
                $params[] = new ParameterInformation(
                    $param,
                    $this->definitionResolver->getDocumentationFromNode($element)
                );
            }
        }
        return $params;
    }
private function createParameters(FunctionLike $node): array
    {
        $params = [];
        if ($node->parameters) {
            foreach ($node->parameters->getElements() as $element) {
                $param = (string) $this->definitionResolver->getTypeFromNode($element);
                $param .= ' ';
                if ($element->dotDotDotToken) {
                    $param .= '...';
                }
                $param .= '$' . $element->getName();
                if ($element->default) {
                    $param .= ' = ' . $element->default->getText();
                }
                $params[] = new ParameterInformation(
                    $param,
                    $this->definitionResolver->getDocumentationFromNode($element)
                );
            }
        }
        return $params;
    }
private function createParameters ( FunctionLike $ node ) : array { $ params = [ ] ; if ( $ node -> parameters ) { foreach ( $ node -> parameters -> getElements ( ) as $ element ) { $ param = ( string ) $ this -> definitionResolver -> getTypeFromNode ( $ element ) ; $ param .= ' ' ; if ( $ element -> dotDotDotToken ) { $ param .= '...' ; } $ param .= '$' . $ element -> getName ( ) ; if ( $ element -> default ) { $ param .= ' = ' . $ element -> default -> getText ( ) ; } $ params [ ] = new ParameterInformation ( $ param , $ this -> definitionResolver -> getDocumentationFromNode ( $ element ) ) ; } } return $ params ; }
Gets parameters from a FunctionLike node

@param FunctionLike $node Node to get parameters from

@return ParameterInformation[]
Gets parameters from a FunctionLike node