private function getMethod(\ReflectionMethod $method)
    {
        $methodStmt = $this->factory->method($method->name);
        $params = $method->getParameters();
        foreach ($params as $param) {
            $methodStmt = $this->getMethodStatement($param, $methodStmt);
        }
        $returnType = $method->getReturnType();
        if ($returnType instanceof \ReflectionType) {
            $this->setReturnType($returnType, $methodStmt);
        }
        $methodInsideStatements = $this->getMethodInsideStatement($method);
        $methodStmt->addStmts($methodInsideStatements);

        return $this->addMethodDocComment($methodStmt, $method);
    }
private function getMethod(\ReflectionMethod $method)
    {
        $methodStmt = $this->factory->method($method->name);
        $params = $method->getParameters();
        foreach ($params as $param) {
            $methodStmt = $this->getMethodStatement($param, $methodStmt);
        }
        $returnType = $method->getReturnType();
        if ($returnType instanceof \ReflectionType) {
            $this->setReturnType($returnType, $methodStmt);
        }
        $methodInsideStatements = $this->getMethodInsideStatement($method);
        $methodStmt->addStmts($methodInsideStatements);

        return $this->addMethodDocComment($methodStmt, $method);
    }
private function getMethod ( \ ReflectionMethod $ method ) { $ methodStmt = $ this -> factory -> method ( $ method -> name ) ; $ params = $ method -> getParameters ( ) ; foreach ( $ params as $ param ) { $ methodStmt = $ this -> getMethodStatement ( $ param , $ methodStmt ) ; } $ returnType = $ method -> getReturnType ( ) ; if ( $ returnType instanceof \ ReflectionType ) { $ this -> setReturnType ( $ returnType , $ methodStmt ) ; } $ methodInsideStatements = $ this -> getMethodInsideStatement ( $ method ) ; $ methodStmt -> addStmts ( $ methodInsideStatements ) ; return $ this -> addMethodDocComment ( $ methodStmt , $ method ) ; }
Return method statement

@return \PhpParser\Node\Stmt\ClassMethod
Return method statement