protected function interceptMethods(ReflectionClass $originalClass, array $methodNames): array
    {
        $interceptedMethods = [];
        foreach ($methodNames as $methodName) {
            $reflectionMethod = $originalClass->getMethod($methodName);
            $methodBody       = $this->getJoinpointInvocationBody($reflectionMethod);

            $interceptedMethods[$methodName] = new InterceptedMethodGenerator($reflectionMethod, $methodBody);
        }

        return $interceptedMethods;
    }
protected function interceptMethods(ReflectionClass $originalClass, array $methodNames): array
    {
        $interceptedMethods = [];
        foreach ($methodNames as $methodName) {
            $reflectionMethod = $originalClass->getMethod($methodName);
            $methodBody       = $this->getJoinpointInvocationBody($reflectionMethod);

            $interceptedMethods[$methodName] = new InterceptedMethodGenerator($reflectionMethod, $methodBody);
        }

        return $interceptedMethods;
    }
protected function interceptMethods ( ReflectionClass $ originalClass , array $ methodNames ) : array { $ interceptedMethods = [ ] ; foreach ( $ methodNames as $ methodName ) { $ reflectionMethod = $ originalClass -> getMethod ( $ methodName ) ; $ methodBody = $ this -> getJoinpointInvocationBody ( $ reflectionMethod ) ; $ interceptedMethods [ $ methodName ] = new InterceptedMethodGenerator ( $ reflectionMethod , $ methodBody ) ; } return $ interceptedMethods ; }
Returns list of intercepted method generators for class by method names

@param string[] $methodNames List of methods to intercept

@return InterceptedMethodGenerator[]
Returns list of intercepted method generators for class by method names