Skip to content

Commit

Permalink
Merge pull request #153 from bitExpert/dependabot/composer/nikic/php-…
Browse files Browse the repository at this point in the history
…parser-4.13.1

Bump nikic/php-parser from 4.12.0 to 4.13.1
  • Loading branch information
shochdoerfer committed Nov 13, 2021
2 parents b26cc5c + 003039a commit 96aeef0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"madewithlove/license-checker": "^0.10.0",
"magento/framework": ">=101.0.0",
"mikey179/vfsstream": "^1.6.8",
"nikic/php-parser": "^4.10.5",
"nikic/php-parser": "^4.13.1",
"phpstan/extension-installer": "^1.1.0",
"phpstan/phpstan-phpunit": "^0.12.20",
"phpstan/phpstan-strict-rules": "^0.12.9",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ public function processNode(Node $node, Scope $scope): array
return [];
}

/** @var \PhpParser\Node\Arg[] $args */
$args = $node->args;
/** @var ConstantStringType $argType */
$argType = $scope->getType($node->args[0]->value);
$argType = $scope->getType($args[0]->value);
return [
sprintf(
'%s does not extend \Magento\Framework\Data\Collection as required!',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ public function getTypeFromMethodCall(
if (count($methodCall->args) === 0) {
return $mixedType;
}
$argType = $scope->getType($methodCall->args[0]->value);

/** @var \PhpParser\Node\Arg[] $args */
$args = $methodCall->args;
$argType = $scope->getType($args[0]->value);
if (!$argType instanceof ConstantStringType) {
return $mixedType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ private function getTypeForGetObjectMethodCall(
return $mixedType;
}

$argType = $scope->getType($methodCall->args[0]->value);
/** @var \PhpParser\Node\Arg[] $args */
$args = $methodCall->args;
$argType = $scope->getType($args[0]->value);
if (!$argType instanceof ConstantStringType) {
return $mixedType;
}
Expand Down Expand Up @@ -121,8 +123,10 @@ private function getTypeForGetCollectionMockMethodCall(
MethodCall $methodCall,
Scope $scope
): Type {
/** @var \PhpParser\Node\Arg[] $args */
$args = $methodCall->args;
/** @var ConstantStringType $type */
$type = $scope->getType($methodCall->args[0]->value);
$type = $scope->getType($args[0]->value);
/** @var string $className */
$className = $type->getValue();
if (!is_subclass_of($className, 'Magento\Framework\Data\Collection')) {
Expand Down

0 comments on commit 96aeef0

Please sign in to comment.