Skip to content

Commit f59edb7

Browse files
committed
Fixes wrong order arguents
1 parent 481a9b5 commit f59edb7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/phpDocumentor/Reflection/Php/Factory/Argument.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public function matches($object): bool
6161
*/
6262
protected function doCreate($object, StrategyContainer $strategies, ?Context $context = null)
6363
{
64-
Assert::isInstanceOf(Param::class, $object);
65-
Assert::isInstanceOf(Variable::class, $object->var);
64+
Assert::isInstanceOf($object, Param::class);
65+
Assert::isInstanceOf($object->var, Variable::class);
6666
$default = null;
6767
if ($object->default !== null) {
6868
$default = $this->valueConverter->prettyPrintExpr($object->default);

tests/unit/phpDocumentor/Reflection/Php/Factory/ArgumentTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ public function testCreate()
5454
$factory = new ProjectFactoryStrategies([]);
5555

5656
$argMock = m::mock(Param::class);
57-
$argMock->var = new stdClass;
58-
$argMock->var->name = 'myArgument';
57+
$argMock->var = new \PhpParser\Node\Expr\Variable('myArgument');
5958
$argMock->default = new String_('MyDefault');
6059
$argMock->byRef = true;
6160
$argMock->variadic = true;

0 commit comments

Comments
 (0)