| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 24 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 12 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 22 | public static function generateMethod( | ||
| 23 | 2 | MethodReflection $originalMethod, | |
| 24 | PropertyGenerator $prefixInterceptors, | ||
| 25 | PropertyGenerator $suffixInterceptors | ||
| 26 |     ) : self { | ||
| 27 | /** @var self $method */ | ||
| 28 | $method = static::fromReflectionWithoutBodyAndDocBlock($originalMethod); | ||
| 29 | 2 | $forwardedParams = []; | |
| 30 | 2 | ||
| 31 |         foreach ($originalMethod->getParameters() as $parameter) { | ||
| 32 | 2 | $forwardedParams[] = ($parameter->isVariadic() ? '...' : '') . '$' . $parameter->getName(); | |
|  | |||
| 33 | 2 | } | |
| 34 | |||
| 35 | $method->setBody(InterceptorGenerator::createInterceptedMethodBody( | ||
| 36 | 2 | '$returnValue = parent::' | |
| 37 |             . $originalMethod->getName() . '(' . implode(', ', $forwardedParams) . ');', | ||
| 38 | 2 | $method, | |
| 39 | 2 | $prefixInterceptors, | |
| 40 | 2 | $suffixInterceptors, | |
| 41 | 2 | $originalMethod | |
| 42 | 2 | )); | |
| 43 | |||
| 44 | return $method; | ||
| 45 | 2 | } | |
| 46 | } | ||
| 47 | 
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.