protected function buildMethodsInterceptorCode(string $targetClassName, array $interceptedMethods): void
    {
        foreach ($interceptedMethods as $methodName => $methodMetaInformation) {
            if (count($methodMetaInformation['groupedAdvices']) === 0) {
                throw new Aop\Exception\VoidImplementationException(sprintf('Refuse to introduce method %s into target class %s because it has no implementation code. You might want to create an around advice which implements this method.', $methodName, $targetClassName), 1303224472);
            }
            $builderType = 'Adviced' . ($methodName === '__construct' ? 'Constructor' : 'Method');
            $this->methodInterceptorBuilders[$builderType]->build($methodName, $interceptedMethods, $targetClassName);
        }
    }
protected function buildMethodsInterceptorCode(string $targetClassName, array $interceptedMethods): void
    {
        foreach ($interceptedMethods as $methodName => $methodMetaInformation) {
            if (count($methodMetaInformation['groupedAdvices']) === 0) {
                throw new Aop\Exception\VoidImplementationException(sprintf('Refuse to introduce method %s into target class %s because it has no implementation code. You might want to create an around advice which implements this method.', $methodName, $targetClassName), 1303224472);
            }
            $builderType = 'Adviced' . ($methodName === '__construct' ? 'Constructor' : 'Method');
            $this->methodInterceptorBuilders[$builderType]->build($methodName, $interceptedMethods, $targetClassName);
        }
    }
protected function buildMethodsInterceptorCode ( string $ targetClassName , array $ interceptedMethods ) : void { foreach ( $ interceptedMethods as $ methodName => $ methodMetaInformation ) { if ( count ( $ methodMetaInformation [ 'groupedAdvices' ] ) === 0 ) { throw new Aop \ Exception \ VoidImplementationException ( sprintf ( 'Refuse to introduce method %s into target class %s because it has no implementation code. You might want to create an around advice which implements this method.' , $ methodName , $ targetClassName ) , 1303224472 ) ; } $ builderType = 'Adviced' . ( $ methodName === '__construct' ? 'Constructor' : 'Method' ) ; $ this -> methodInterceptorBuilders [ $ builderType ] -> build ( $ methodName , $ interceptedMethods , $ targetClassName ) ; } }
Traverses all intercepted methods and their advices and builds PHP code to intercept
methods if necessary.

The generated code is added directly to the proxy class by calling the respective
methods of the Compiler API.

@param string $targetClassName The target class the pointcut should match with
@param array $interceptedMethods An array of method names which need to be intercepted
@return void
@throws Aop\Exception\VoidImplementationException
Traverses all intercepted methods and their advices and builds PHP code to intercept methods if necessary .