File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public function fromMethodReflection(\ReflectionMethod $from): Method
76
76
$ method ->setVariadic ($ from ->isVariadic ());
77
77
$ method ->setComment (Helpers::unformatDocComment ((string ) $ from ->getDocComment ()));
78
78
if ($ from ->hasReturnType ()) {
79
- $ method ->setReturnType (( string ) $ from ->getReturnType ());
79
+ $ method ->setReturnType ($ from ->getReturnType ()-> getName ());
80
80
$ method ->setReturnNullable ($ from ->getReturnType ()->allowsNull ());
81
81
}
82
82
return $ method ;
@@ -96,7 +96,7 @@ public function fromFunctionReflection(\ReflectionFunction $from)
96
96
$ function ->setComment (Helpers::unformatDocComment ((string ) $ from ->getDocComment ()));
97
97
}
98
98
if ($ from ->hasReturnType ()) {
99
- $ function ->setReturnType (( string ) $ from ->getReturnType ());
99
+ $ function ->setReturnType ($ from ->getReturnType ()-> getName ());
100
100
$ function ->setReturnNullable ($ from ->getReturnType ()->allowsNull ());
101
101
}
102
102
return $ function ;
@@ -107,7 +107,7 @@ public function fromParameterReflection(\ReflectionParameter $from): Parameter
107
107
{
108
108
$ param = new Parameter ($ from ->getName ());
109
109
$ param ->setReference ($ from ->isPassedByReference ());
110
- $ param ->setTypeHint ($ from ->hasType () ? ( string ) $ from ->getType () : null );
110
+ $ param ->setTypeHint ($ from ->hasType () ? $ from ->getType ()-> getName () : null );
111
111
$ param ->setNullable ($ from ->hasType () && $ from ->getType ()->allowsNull ());
112
112
if ($ from ->isDefaultValueAvailable ()) {
113
113
$ param ->setDefaultValue ($ from ->isDefaultValueConstant ()
You can’t perform that action at this time.
0 commit comments