22
22
use phpDocumentor \Reflection \Types \Compound ;
23
23
use phpDocumentor \Reflection \Types \Context ;
24
24
use phpDocumentor \Reflection \Types \Integer ;
25
+ use phpDocumentor \Reflection \Types \Mixed_ ;
25
26
use phpDocumentor \Reflection \Types \Object_ ;
26
27
use phpDocumentor \Reflection \Types \String_ ;
27
28
use phpDocumentor \Reflection \Types \This ;
@@ -137,7 +138,7 @@ public function testArgumentsMayBePassedAsString() : void
137
138
{
138
139
$ arguments = ['argument1 ' ];
139
140
$ expected = [
140
- ['name ' => $ arguments [0 ], 'type ' => new Void_ ()],
141
+ ['name ' => $ arguments [0 ], 'type ' => new Mixed_ ()],
141
142
];
142
143
143
144
$ fixture = new Method ('myMethod ' , $ arguments );
@@ -149,11 +150,11 @@ public function testArgumentsMayBePassedAsString() : void
149
150
* @covers ::__construct
150
151
* @covers ::getArguments
151
152
*/
152
- public function testArgumentTypeCanBeInferredAsVoid () : void
153
+ public function testArgumentTypeCanBeInferredAsMixed () : void
153
154
{
154
155
$ arguments = [['name ' => 'argument1 ' ]];
155
156
$ expected = [
156
- ['name ' => $ arguments [0 ]['name ' ], 'type ' => new Void_ ()],
157
+ ['name ' => $ arguments [0 ]['name ' ], 'type ' => new Mixed_ ()],
157
158
];
158
159
159
160
$ fixture = new Method ('myMethod ' , $ arguments );
@@ -171,8 +172,8 @@ public function testArgumentTypeCanBeInferredAsVoid() : void
171
172
public function testRestArgumentIsParsedAsRegularArg () : void
172
173
{
173
174
$ 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_ ()],
176
177
['name ' => 'rest2 ' , 'type ' => new Array_ ()],
177
178
];
178
179
@@ -286,7 +287,7 @@ public function testFactoryMethod() : void
286
287
$ description = new Description ('My Description ' );
287
288
$ expectedArguments = [
288
289
['name ' => 'argument1 ' , 'type ' => new String_ ()],
289
- ['name ' => 'argument2 ' , 'type ' => new Void_ ()],
290
+ ['name ' => 'argument2 ' , 'type ' => new Mixed_ ()],
290
291
];
291
292
292
293
$ descriptionFactory ->shouldReceive ('create ' )->with ('My Description ' , $ context )->andReturn ($ description );
@@ -298,7 +299,7 @@ public function testFactoryMethod() : void
298
299
$ context
299
300
);
300
301
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 );
302
303
$ this ->assertSame ('myMethod ' , $ fixture ->getMethodName ());
303
304
$ this ->assertEquals ($ expectedArguments , $ fixture ->getArguments ());
304
305
$ this ->assertInstanceOf (Void_::class, $ fixture ->getReturnType ());
0 commit comments