Skip to content

Commit 1767581

Browse files
committed
Improve compatibility with nikic/php-parser 4.13.0
1 parent cbe261e commit 1767581

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Mockery/Type/MockDynamicNamedMockReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function getTypeFromStaticMethodCall(
3232
{
3333
$defaultReturnType = new ObjectType('Mockery\\MockInterface');
3434

35-
$args = $methodCall->args;
35+
$args = $methodCall->getArgs();
3636
if (count($args) > 1) {
3737
array_shift($args);
3838
}

src/Mockery/Type/MockDynamicReturnTypeExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ public function getTypeFromStaticMethodCall(
3434
): Type
3535
{
3636
$defaultReturnType = new ObjectType('Mockery\\MockInterface');
37-
if (count($methodCall->args) === 0) {
37+
if (count($methodCall->getArgs()) === 0) {
3838
return $defaultReturnType;
3939
}
4040

4141
$types = [$defaultReturnType];
42-
foreach ($methodCall->args as $arg) {
42+
foreach ($methodCall->getArgs() as $arg) {
4343
$classType = $scope->getType($arg->value);
4444
if (!$classType instanceof ConstantStringType) {
4545
continue;

0 commit comments

Comments
 (0)