From 51bf2ca737be979c317c2a2956ac40ffb3276055 Mon Sep 17 00:00:00 2001 From: Jan Rosier Date: Thu, 2 Jan 2025 21:11:52 +0100 Subject: [PATCH] Use spl_object_id() instead of spl_object_hash() --- src/NodeVisitor/SafeAnalysisNodeVisitor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NodeVisitor/SafeAnalysisNodeVisitor.php b/src/NodeVisitor/SafeAnalysisNodeVisitor.php index 3be82304f..681751e98 100644 --- a/src/NodeVisitor/SafeAnalysisNodeVisitor.php +++ b/src/NodeVisitor/SafeAnalysisNodeVisitor.php @@ -42,7 +42,7 @@ final class SafeAnalysisNodeVisitor implements NodeVisitorInterface */ public function getSafe(Node $node) { - $hash = spl_object_hash($node); + $hash = spl_object_id($node); if (!isset($this->data[$hash])) { return []; } @@ -64,7 +64,7 @@ final class SafeAnalysisNodeVisitor implements NodeVisitorInterface private function setSafe(Node $node, array $safe): void { - $hash = spl_object_hash($node); + $hash = spl_object_id($node); if (isset($this->data[$hash])) { foreach ($this->data[$hash] as &$bucket) { if ($bucket['key'] === $node) {