25
25
use gossi \codegen \model \parts \ReferenceReturnPart ;
26
26
use gossi \codegen \model \parts \TypeDocblockGeneratorPart ;
27
27
use gossi \codegen \model \parts \TypePart ;
28
- use gossi \codegen \utils \ReflectionUtils ;
29
28
use gossi \docblock \Docblock ;
30
29
use gossi \docblock \tags \ReturnTag ;
31
30
@@ -46,32 +45,32 @@ class PhpFunction extends AbstractModel implements GenerateableInterface, Namesp
46
45
use TypeDocblockGeneratorPart;
47
46
use TypePart;
48
47
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));
60
59
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());
65
64
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?
68
67
69
- $ param = PhpParameter::fromReflection ($ refParam );
70
- $ function ->addParameter ($ param );
71
- }
68
+ // $param = PhpParameter::fromReflection($refParam);
69
+ // $function->addParameter($param);
70
+ // }
72
71
73
- return $ function ;
74
- }
72
+ // return $function;
73
+ // }
75
74
76
75
/**
77
76
* Creates a new PHP function
0 commit comments