diff --git a/src/Persistence/PersistenceManager.php b/src/Persistence/PersistenceManager.php index ed18cd05..88979e6d 100644 --- a/src/Persistence/PersistenceManager.php +++ b/src/Persistence/PersistenceManager.php @@ -76,7 +76,11 @@ public function save(object $object): object } /** - * @param callable():mixed $callback + * @template T + * + * @param callable():T $callback + * + * @return T */ public function flushAfter(callable $callback): mixed { diff --git a/src/Persistence/functions.php b/src/Persistence/functions.php index 651ce0ea..b38b608c 100644 --- a/src/Persistence/functions.php +++ b/src/Persistence/functions.php @@ -149,7 +149,11 @@ function delete(object $object): object } /** - * @param callable():mixed $callback + * @template T + * + * @param callable():T $callback + * + * @return T */ function flush_after(callable $callback): mixed {