public function build($functionName = null)
    {
        $parameterBuilder = new ParameterBuilder();
        $parameterBuilder->build($functionName);
        $signatureParameters = $parameterBuilder->getSignatureParameters();

        /**
         * If a class with the same signature exists, it is considered equivalent
         * to the generated class.
         */
        $hash = md5($signatureParameters);
        $this->namespace = __NAMESPACE__.$hash;
        if (class_exists($this->getFullyQualifiedClassName())) {
            return;
        }
        
        $data = [
            "namespace"           => $this->namespace,
            "signatureParameters" => $signatureParameters,
        ];
        $this->template->setVar($data, false);
        $definition = $this->template->render();
        
        eval($definition);
    }
public function build($functionName = null)
    {
        $parameterBuilder = new ParameterBuilder();
        $parameterBuilder->build($functionName);
        $signatureParameters = $parameterBuilder->getSignatureParameters();

        /**
         * If a class with the same signature exists, it is considered equivalent
         * to the generated class.
         */
        $hash = md5($signatureParameters);
        $this->namespace = __NAMESPACE__.$hash;
        if (class_exists($this->getFullyQualifiedClassName())) {
            return;
        }
        
        $data = [
            "namespace"           => $this->namespace,
            "signatureParameters" => $signatureParameters,
        ];
        $this->template->setVar($data, false);
        $definition = $this->template->render();
        
        eval($definition);
    }
public function build ( $ functionName = null ) { $ parameterBuilder = new ParameterBuilder ( ) ; $ parameterBuilder -> build ( $ functionName ) ; $ signatureParameters = $ parameterBuilder -> getSignatureParameters ( ) ; /**
         * If a class with the same signature exists, it is considered equivalent
         * to the generated class.
         */ $ hash = md5 ( $ signatureParameters ) ; $ this -> namespace = __NAMESPACE__ . $ hash ; if ( class_exists ( $ this -> getFullyQualifiedClassName ( ) ) ) { return ; } $ data = [ "namespace" => $ this -> namespace , "signatureParameters" => $ signatureParameters , ] ; $ this -> template -> setVar ( $ data , false ) ; $ definition = $ this -> template -> render ( ) ; eval ( $ definition ) ; }
Builds a MockDelegateFunction for a function.

@param string|null $functionName The mocked function.

@SuppressWarnings(PHPMD)
Builds a MockDelegateFunction for a function .