Skip to content

Commit

Permalink
minor: Add templated types to flush_after (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
BackEndTea authored Nov 6, 2024
1 parent 44eec45 commit edf287e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Persistence/PersistenceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 5 additions & 1 deletion src/Persistence/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit edf287e

Please sign in to comment.