| Conditions | 3 | 
| Paths | 2 | 
| Total Lines | 15 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 6 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 16 | public static function addMethodIfNotFinal( | ||
| 17 | 2 | ReflectionClass $originalClass, | |
| 18 | ClassGenerator $classGenerator, | ||
| 19 | MethodGenerator $generatedMethod | ||
| 20 |     ) : bool { | ||
| 21 | $methodName = $generatedMethod->getName(); | ||
| 22 | 2 | ||
| 23 |         if ($originalClass->hasMethod($methodName) && $originalClass->getMethod($methodName)->isFinal()) { | ||
| 24 | 2 | return false; | |
| 25 | 1 | } | |
| 26 | |||
| 27 | $classGenerator->addMethodFromGenerator($generatedMethod); | ||
| 28 | 1 | ||
| 29 | return true; | ||
| 30 | 1 | } | |
| 31 | } | ||
| 32 |