src/ArtaxServiceBuilder/OperationGenerator.php
private function createMethodGenerator($methodName, $body, DocBlockGenerator $docBlock, $parameterInfoArray, $returnType = null) {
        $parameters = [];
        foreach ($parameterInfoArray as $parameterInfo) {
            $parameters[] = new ParameterGenerator($parameterInfo[0], $parameterInfo[1]);
        }

        $methodGenerator = new MethodGenerator($methodName);
        $methodGenerator->setParameters($parameters);
        
        if ($returnType != null) {
            if (is_array($returnType)) {
                $returnType = implode('|', $returnType);
            }
            
            $tags[] = new GenericTag('return', $returnType);
            $docBlock->setTags($tags);
        }
        
        $methodGenerator->setDocBlock($docBlock);
        $methodGenerator->setBody($body);
        
        return $methodGenerator;
    }
private function createMethodGenerator($methodName, $body, DocBlockGenerator $docBlock, $parameterInfoArray, $returnType = null) {
        $parameters = [];
        foreach ($parameterInfoArray as $parameterInfo) {
            $parameters[] = new ParameterGenerator($parameterInfo[0], $parameterInfo[1]);
        }

        $methodGenerator = new MethodGenerator($methodName);
        $methodGenerator->setParameters($parameters);
        
        if ($returnType != null) {
            if (is_array($returnType)) {
                $returnType = implode('|', $returnType);
            }
            
            $tags[] = new GenericTag('return', $returnType);
            $docBlock->setTags($tags);
        }
        
        $methodGenerator->setDocBlock($docBlock);
        $methodGenerator->setBody($body);
        
        return $methodGenerator;
    }
private function createMethodGenerator ( $ methodName , $ body , DocBlockGenerator $ docBlock , $ parameterInfoArray , $ returnType = null ) { $ parameters = [ ] ; foreach ( $ parameterInfoArray as $ parameterInfo ) { $ parameters [ ] = new ParameterGenerator ( $ parameterInfo [ 0 ] , $ parameterInfo [ 1 ] ) ; } $ methodGenerator = new MethodGenerator ( $ methodName ) ; $ methodGenerator -> setParameters ( $ parameters ) ; if ( $ returnType != null ) { if ( is_array ( $ returnType ) ) { $ returnType = implode ( '|' , $ returnType ) ; } $ tags [ ] = new GenericTag ( 'return' , $ returnType ) ; $ docBlock -> setTags ( $ tags ) ; } $ methodGenerator -> setDocBlock ( $ docBlock ) ; $ methodGenerator -> setBody ( $ body ) ; return $ methodGenerator ; }
Helper method for generating trivial methods.
@param $methodName
@param $body
@param $docBlock
@param $parameterInfoArray
@return MethodGenerator
Helper method for generating trivial methods .