| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public static function generateMethod(MethodReflection $originalMethod) : self |
||
| 20 | { |
||
| 21 | 3 | /** @var static $method */ |
|
| 22 | $method = static::fromReflectionWithoutBodyAndDocBlock($originalMethod); |
||
| 23 | |||
| 24 | 3 | if ($originalMethod->returnsReference()) { |
|
| 25 | $reference = IdentifierSuffixer::getIdentifier('ref'); |
||
| 26 | 3 | ||
| 27 | 1 | $method->setBody("\$reference = null;\nreturn \$" . $reference . ';'); |
|
| 28 | } |
||
| 29 | 1 | ||
| 30 | return $method; |
||
| 31 | } |
||
| 32 | } |
||
| 33 |