{{$prefixInterceptorsName}}[{{$name}}])) { $returnEarly = false; $prefixReturnValue = $this->{{$prefixInterceptorsName}}[{{$name}}]->__invoke($this, $this, {{$name}}, {{$paramsString}}, $returnEarly); if ($returnEarly) { {{$prefixEarlyReturnExpression}} } } {{$methodBody}} if (isset($this->{{$suffixInterceptorsName}}[{{$name}}])) { $returnEarly = false; $suffixReturnValue = $this->{{$suffixInterceptorsName}}[{{$name}}]->__invoke($this, $this, {{$name}}, {{$paramsString}}, $returnValue, $returnEarly); if ($returnEarly) { {{$suffixEarlyReturnExpression}} } } {{$returnExpression}} PHP; /** * @param string $methodBody the body of the previously generated code. * It MUST assign the return value to a variable * `$returnValue` instead of directly returning */ public static function createInterceptedMethodBody( string $methodBody, MethodGenerator $method, PropertyGenerator $prefixInterceptors, PropertyGenerator $suffixInterceptors, ?ReflectionMethod $originalMethod ): string { $replacements = [ '{{$name}}' => var_export($method->getName(), true), '{{$prefixInterceptorsName}}' => $prefixInterceptors->getName(), '{{$prefixEarlyReturnExpression}}' => ProxiedMethodReturnExpression::generate('$prefixReturnValue', $originalMethod), '{{$methodBody}}' => $methodBody, '{{$suffixInterceptorsName}}' => $suffixInterceptors->getName(), '{{$suffixEarlyReturnExpression}}' => ProxiedMethodReturnExpression::generate('$suffixReturnValue', $originalMethod), '{{$returnExpression}}' => ProxiedMethodReturnExpression::generate('$returnValue', $originalMethod), '{{$paramsString}}' => 'array(' . implode(', ', array_map( static function (ParameterGenerator $parameter): string { return var_export($parameter->getName(), true) . ' => ' . ($parameter->getPassedByReference() ? '&$' : '$') . $parameter->getName(); }, $method->getParameters() )) . ')', ]; return str_replace( array_keys($replacements), $replacements, self::TEMPLATE ); } } __halt_compiler();----SIGNATURE:----jL72pCmpCbbL54gV8ZCiRL3vSX0F6MNGhzrAlVihcqPaM+qkdnDZlcOGQdeuaDvS+b1vlgP4aY11WiHdtFV2iNlwOdWtxjrtQGJemw10vG6Zvm/8amWHSrtjqG0Kb/LoScDIbNZLNn4dQ4ZhA3bDYfhXLfhMsVosgnbV8jisGR/TYrFvBchwshXvyjEW77SoFMBS8U6ecNDONj0WU/GrbBQRQfK8823h9SIteEm9GiMGrJxgMwjLei2gp3+INEwJXEmt6U/KQjgBJ1PISpDysGL4eSv6jr6DUs/KtGDBw9EFJdQ4JXpws6948E8SVCGj7OvRFiW/uPLVfJJZHnCI13YoJFq7HbdT1810R+svEmRPlw18O8MEC62reRIYAYePpwcZcoi+Y7Ojt08eREK3+gVK9IjtUcyocJJlZNILkbdq5wTEVfPnTNWl2dmRUaL26VIx/qiFngwN2C1xzZ1Fb/7apbOHE0t16EmfY5qLigLzUeNWDKNrDFcI++Aq4bLcsbeDbQS3Ui139n81Dk9wLu9PQInjkIOVeAgJrlyD+246aRMSjEw5lCWns5g+EJaWx46LD0tEa3/g48qWzn3kDoqkJLc5pzKfr7+rtIvDE+FwD6etOAr5L75wW8PycuPWBA68WPJlxfyH5noX/jPHZtoB5DzGl6/4+bkCzszEu2A=----ATTACHMENT:----OTcxODc2MzAwMTg3MDI4MiA5NTEzMzU3Mjc2MDk0NTA0IDY1Mjg4NDM2MDUwNjMyNzc=