Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Mar 3, 2019
1 parent 76d52cb commit f217e5d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Analyser/NodeScopeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1237,15 +1237,20 @@ function (Scope $scope) use ($expr, $nodeCallback, $depth): Scope {
$className = $scope->resolveName($expr->class);
if ($this->broker->hasClass($className)) {
$classReflection = $this->broker->getClass($className);
if ($classReflection->hasMethod($expr->name->name)) {
if (is_string($expr->name)) {
$methodName = $expr->name;
} else {
$methodName = $expr->name->name;
}
if ($classReflection->hasMethod($methodName)) {
$parametersAcceptor = ParametersAcceptorSelector::selectFromArgs(
$scope,
$expr->args,
$classReflection->getMethod($expr->name->name, $scope)->getVariants()
$classReflection->getMethod($methodName, $scope)->getVariants()
);
if (
$classReflection->getName() === 'Closure'
&& strtolower($expr->name->name) === 'bind'
&& strtolower($methodName) === 'bind'
) {
$thisType = null;
if (isset($expr->args[1])) {
Expand Down

0 comments on commit f217e5d

Please sign in to comment.