2525use gossi \codegen \model \parts \ReferenceReturnPart ;
2626use gossi \codegen \model \parts \TypeDocblockGeneratorPart ;
2727use gossi \codegen \model \parts \TypePart ;
28- use gossi \codegen \utils \ReflectionUtils ;
2928use gossi \docblock \Docblock ;
3029use gossi \docblock \tags \ReturnTag ;
3130
@@ -46,32 +45,32 @@ class PhpFunction extends AbstractModel implements GenerateableInterface, Namesp
4645 use TypeDocblockGeneratorPart;
4746 use TypePart;
4847
49- /**
50- * Creates a PHP function from reflection
51- *
52- * @deprecated will be removed in version 0.5
53- * @param \ReflectionFunction $ref
54- * @return PhpFunction
55- */
56- public static function fromReflection (\ReflectionFunction $ ref ) {
57- $ function = self ::create ($ ref ->name )
58- ->setReferenceReturned ($ ref ->returnsReference ())
59- ->setBody (ReflectionUtils::getFunctionBody ($ ref ));
48+ // /**
49+ // * Creates a PHP function from reflection
50+ // *
51+ // * @deprecated will be removed in version 0.5
52+ // * @param \ReflectionFunction $ref
53+ // * @return PhpFunction
54+ // */
55+ // public static function fromReflection(\ReflectionFunction $ref) {
56+ // $function = self::create($ref->name)
57+ // ->setReferenceReturned($ref->returnsReference())
58+ // ->setBody(ReflectionUtils::getFunctionBody($ref));
6059
61- $ docblock = new Docblock ($ ref );
62- $ function ->setDocblock ($ docblock );
63- $ function ->setDescription ($ docblock ->getShortDescription ());
64- $ function ->setLongDescription ($ docblock ->getLongDescription ());
60+ // $docblock = new Docblock($ref);
61+ // $function->setDocblock($docblock);
62+ // $function->setDescription($docblock->getShortDescription());
63+ // $function->setLongDescription($docblock->getLongDescription());
6564
66- foreach ($ ref ->getParameters () as $ refParam ) {
67- assert ($ refParam instanceof \ReflectionParameter); // hmm - assert here?
65+ // foreach ($ref->getParameters() as $refParam) {
66+ // assert($refParam instanceof \ReflectionParameter); // hmm - assert here?
6867
69- $ param = PhpParameter::fromReflection ($ refParam );
70- $ function ->addParameter ($ param );
71- }
68+ // $param = PhpParameter::fromReflection($refParam);
69+ // $function->addParameter($param);
70+ // }
7271
73- return $ function ;
74- }
72+ // return $function;
73+ // }
7574
7675 /**
7776 * Creates a new PHP function
0 commit comments