11
11
12
12
use Nette ;
13
13
use Nette \Utils \Reflection ;
14
+ use Nette \Utils \Type ;
14
15
use ReflectionClass ;
15
16
use ReflectionMethod ;
16
17
@@ -121,7 +122,7 @@ class_uses($name),
121
122
$ name ,
122
123
$ prop ->name ,
123
124
$ prop ->getDocComment (),
124
- Reflection:: getPropertyTypes ($ prop ),
125
+ ( string ) Type:: fromReflection ($ prop ),
125
126
PHP_VERSION_ID >= 80000 ? count ($ prop ->getAttributes (Attributes \Inject::class)) : null ,
126
127
];
127
128
}
@@ -133,7 +134,7 @@ class_uses($name),
133
134
$ method ->name ,
134
135
$ method ->getDocComment (),
135
136
self ::hashParameters ($ method ),
136
- Reflection:: getReturnTypes ($ method ),
137
+ ( string ) Type:: fromReflection ($ method ),
137
138
];
138
139
}
139
140
}
@@ -157,7 +158,7 @@ class_uses($name),
157
158
$ uses ,
158
159
$ method ->getDocComment (),
159
160
self ::hashParameters ($ method ),
160
- Reflection:: getReturnTypes ($ method ),
161
+ ( string ) Type:: fromReflection ($ method ),
161
162
];
162
163
}
163
164
@@ -171,7 +172,7 @@ private static function hashParameters(\ReflectionFunctionAbstract $method): arr
171
172
foreach ($ method ->getParameters () as $ param ) {
172
173
$ res [] = [
173
174
$ param ->name ,
174
- Reflection:: getParameterTypes ($ param ),
175
+ ( string ) Type:: fromReflection ($ param ),
175
176
$ param ->isVariadic (),
176
177
$ param ->isDefaultValueAvailable ()
177
178
? [Reflection::getParameterDefaultValue ($ param )]
0 commit comments