Skip to content

Commit ba25a71

Browse files
committed
Use more efficient spl_object_id() over spl_object_hash()
1 parent e9f8dd7 commit ba25a71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Type/RecursionGuard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PHPStan\Type;
44

5-
use function spl_object_hash;
5+
use function spl_object_id;
66

77
final class RecursionGuard
88
{
@@ -37,7 +37,7 @@ public static function run(Type $type, callable $callback)
3737
*/
3838
public static function runOnObjectIdentity(Type $type, callable $callback)
3939
{
40-
$key = spl_object_hash($type);
40+
$key = spl_object_id($type);
4141
if (isset(self::$context[$key])) {
4242
return new ErrorType();
4343
}

0 commit comments

Comments
 (0)