@@ -63,6 +63,7 @@ final class Method extends BaseTag implements Factory\StaticMethod
63
63
64
64
/**
65
65
* @param array<int, array<string, Type|string>> $arguments
66
+ * @param MethodParameter[] $parameters
66
67
* @phpstan-param array<int, array{name: string, type: Type}|string> $arguments
67
68
*/
68
69
public function __construct (
@@ -90,6 +91,10 @@ public function __construct(
90
91
$ this ->parameters = $ parameters ?? $ this ->fromLegacyArguments ($ arguments );
91
92
}
92
93
94
+ /**
95
+ * @deprecated Create using static factory is deprecated,
96
+ * this method should not be called directly by library consumers
97
+ */
93
98
public static function create (
94
99
string $ body ,
95
100
?TypeResolver $ typeResolver = null ,
@@ -261,7 +266,7 @@ public function __toString(): string
261
266
{
262
267
$ arguments = [];
263
268
foreach ($ this ->parameters as $ parameter ) {
264
- $ arguments [] = ( $ parameter ->getType () ?? new Mixed_ () ) . ' ' .
269
+ $ arguments [] = $ parameter ->getType () . ' ' .
265
270
($ parameter ->isReference () ? '& ' : '' ) .
266
271
($ parameter ->isVariadic () ? '... ' : '' ) .
267
272
'$ ' . $ parameter ->getName ();
@@ -334,6 +339,7 @@ private static function stripRestArg(string $argument): string
334
339
335
340
/**
336
341
* @param array{name: string, type: Type} $arguments
342
+ * @phpstan-param array<int, array{name: string, type: Type}> $arguments
337
343
*
338
344
* @return MethodParameter[]
339
345
*/
0 commit comments