Skip to content

Commit

Permalink
fix: revert adding expr-identifier for func-calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick-Remy committed Jan 19, 2025
1 parent 79c4a7e commit f095412
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
use Psalm\Internal\Analyzer\ClassLikeAnalyzer;
use Psalm\Internal\Analyzer\StatementsAnalyzer;

use function array_keys;
use function array_map;
use function count;
use function implode;
use function in_array;
use function is_int;
use function is_string;
use function strtolower;

Expand Down Expand Up @@ -210,25 +207,6 @@ public static function getExtendedVarId(
}
}

if ($stmt instanceof PhpParser\Node\Expr\FuncCall) {
if ($stmt->name instanceof PhpParser\Node\Name) {
$resolved_name = $stmt->name->toCodeString();
} else {
$resolved_name = self::getExtendedVarId($stmt->name, $this_class_name, $source);
}
if ($resolved_name === null) {
return null;
}

$argsPlaceholder = array_map(
fn($index): string => is_int($index) ? '#' . ($index + 1) : $index,
array_keys($stmt->args),
);
$argsPlaceholder = implode(', ', $argsPlaceholder);

return $resolved_name . '(' . $argsPlaceholder . ')';
}

if ($stmt instanceof PhpParser\Node\Expr\MethodCall
&& $stmt->name instanceof PhpParser\Node\Identifier
&& !$stmt->isFirstClassCallable()
Expand Down

0 comments on commit f095412

Please # to comment.