fromReflection() public static méthode

Creates a PHP parameter from reflection
Deprecation: will be removed in version 0.5
public static fromReflection ( ReflectionParameter $ref ) : PhpParameter
$ref ReflectionParameter
Résultat PhpParameter
 private function paramE(\ReflectionParameter $param)
 {
     $param = PhpParameter::fromReflection($param);
     $this->assertEquals('e', $param->getName());
     $this->assertFalse($param->isPassedByReference());
     $this->assertEmpty($param->getValue());
     $this->assertEquals('callable', $param->getType());
 }
 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;
 }
 /**
  *
  * @return PhpParameter
  */
 protected static function createParameter(\ReflectionParameter $parameter)
 {
     return PhpParameter::fromReflection($parameter);
 }