getFunctionBody() public static method

public static getFunctionBody ( ReflectionFunctionAbstract $function )
$function ReflectionFunctionAbstract
 public function testFunctionBody()
 {
     $actual = ReflectionUtils::getFunctionBody(new \ReflectionFunction('wurst'));
     $expected = 'return \'wurst\';';
     $this->assertEquals($expected, $actual);
     $actual = ReflectionUtils::getFunctionBody(new \ReflectionFunction('inline'));
     $expected = 'return \'x\';';
     $this->assertEquals($expected, $actual);
 }
 public static function fromReflection(\ReflectionMethod $ref)
 {
     $method = new static($ref->name);
     $method->setFinal($ref->isFinal())->setAbstract($ref->isAbstract())->setStatic($ref->isStatic())->setVisibility($ref->isPublic() ? self::VISIBILITY_PUBLIC : ($ref->isProtected() ? self::VISIBILITY_PROTECTED : self::VISIBILITY_PRIVATE))->setReferenceReturned($ref->returnsReference())->setBody(ReflectionUtils::getFunctionBody($ref));
     $docblock = new Docblock($ref);
     $method->setDocblock($docblock);
     $method->setDescription($docblock->getShortDescription());
     $method->setLongDescription($docblock->getLongDescription());
     foreach ($ref->getParameters() as $param) {
         $method->addParameter(static::createParameter($param));
     }
     return $method;
 }
 public static function fromReflection(\ReflectionFunction $ref)
 {
     $function = PhpFunction::create($ref->name)->setReferenceReturned($ref->returnsReference())->setBody(ReflectionUtils::getFunctionBody($ref));
     $docblock = new Docblock($ref);
     $function->setDocblock($docblock);
     $function->setDescription($docblock->getShortDescription());
     $function->setLongDescription($docblock->getLongDescription());
     foreach ($ref->getParameters() as $refParam) {
         assert($refParam instanceof \ReflectionParameter);
         // hmm - assert here?
         $param = PhpParameter::fromReflection($refParam);
         $function->addParameter($param);
     }
     return $function;
 }