Skip to content

Commit f9df197

Browse files
committed
Fix stan
1 parent 0c39efe commit f9df197

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Database/Database.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,12 @@ class Database
372372
protected string $cacheName = 'default';
373373

374374
/**
375-
* @var array<string, array{encode: callable, decode: callable}>
375+
* @var array<string, array{encode: callable, decode: callable, signature: string}>
376376
*/
377377
protected static array $filters = [];
378378

379379
/**
380-
* @var array<string, array{encode: callable, decode: callable}>
380+
* @var array<string, array{encode: callable, decode: callable, signature: string}>
381381
*/
382382
protected array $instanceFilters = [];
383383

@@ -9264,8 +9264,9 @@ private static function computeCallableSignature(callable $callable): string
92649264
return $class . '::' . $callable[1];
92659265
}
92669266

9267-
$ref = new \ReflectionFunction($callable);
9268-
return $ref->getFileName() . ':' . $ref->getStartLine();
9267+
$closure = \Closure::fromCallable($callable);
9268+
$ref = new \ReflectionFunction($closure);
9269+
return ($ref->getFileName() ?: 'unknown') . ':' . $ref->getStartLine();
92699270
}
92709271

92719272
/**

0 commit comments

Comments
 (0)