2222use phpDocumentor \Reflection \Types \Compound ;
2323use phpDocumentor \Reflection \Types \Context ;
2424use phpDocumentor \Reflection \Types \Integer ;
25+ use phpDocumentor \Reflection \Types \Mixed_ ;
2526use phpDocumentor \Reflection \Types \Object_ ;
2627use phpDocumentor \Reflection \Types \String_ ;
2728use phpDocumentor \Reflection \Types \This ;
@@ -137,7 +138,7 @@ public function testArgumentsMayBePassedAsString() : void
137138 {
138139 $ arguments = ['argument1 ' ];
139140 $ expected = [
140- ['name ' => $ arguments [0 ], 'type ' => new Void_ ()],
141+ ['name ' => $ arguments [0 ], 'type ' => new Mixed_ ()],
141142 ];
142143
143144 $ fixture = new Method ('myMethod ' , $ arguments );
@@ -149,11 +150,11 @@ public function testArgumentsMayBePassedAsString() : void
149150 * @covers ::__construct
150151 * @covers ::getArguments
151152 */
152- public function testArgumentTypeCanBeInferredAsVoid () : void
153+ public function testArgumentTypeCanBeInferredAsMixed () : void
153154 {
154155 $ arguments = [['name ' => 'argument1 ' ]];
155156 $ expected = [
156- ['name ' => $ arguments [0 ]['name ' ], 'type ' => new Void_ ()],
157+ ['name ' => $ arguments [0 ]['name ' ], 'type ' => new Mixed_ ()],
157158 ];
158159
159160 $ fixture = new Method ('myMethod ' , $ arguments );
@@ -171,8 +172,8 @@ public function testArgumentTypeCanBeInferredAsVoid() : void
171172 public function testRestArgumentIsParsedAsRegularArg () : void
172173 {
173174 $ expected = [
174- ['name ' => 'arg1 ' , 'type ' => new Void_ ()],
175- ['name ' => 'rest ' , 'type ' => new Void_ ()],
175+ ['name ' => 'arg1 ' , 'type ' => new Mixed_ ()],
176+ ['name ' => 'rest ' , 'type ' => new Mixed_ ()],
176177 ['name ' => 'rest2 ' , 'type ' => new Array_ ()],
177178 ];
178179
@@ -286,7 +287,7 @@ public function testFactoryMethod() : void
286287 $ description = new Description ('My Description ' );
287288 $ expectedArguments = [
288289 ['name ' => 'argument1 ' , 'type ' => new String_ ()],
289- ['name ' => 'argument2 ' , 'type ' => new Void_ ()],
290+ ['name ' => 'argument2 ' , 'type ' => new Mixed_ ()],
290291 ];
291292
292293 $ descriptionFactory ->shouldReceive ('create ' )->with ('My Description ' , $ context )->andReturn ($ description );
@@ -298,7 +299,7 @@ public function testFactoryMethod() : void
298299 $ context
299300 );
300301
301- $ this ->assertSame ('static void myMethod(string $argument1, void $argument2) My Description ' , (string ) $ fixture );
302+ $ this ->assertSame ('static void myMethod(string $argument1, mixed $argument2) My Description ' , (string ) $ fixture );
302303 $ this ->assertSame ('myMethod ' , $ fixture ->getMethodName ());
303304 $ this ->assertEquals ($ expectedArguments , $ fixture ->getArguments ());
304305 $ this ->assertInstanceOf (Void_::class, $ fixture ->getReturnType ());
0 commit comments