Skip to content

Commit

Permalink
feat: narrow types for throw_if and throw_unless (#53005)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebdw authored Oct 1, 2024
1 parent 0431fbb commit 944adf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ function tap($value, $callback = null)
* @param TValue $condition
* @param TException|class-string<TException>|string $exception
* @param mixed ...$parameters
* @return TValue
* @return ($condition is true ? never : TValue)
*
* @throws TException
*/
Expand Down Expand Up @@ -421,7 +421,7 @@ function throw_if($condition, $exception = 'RuntimeException', ...$parameters)
* @param TValue $condition
* @param TException|class-string<TException>|string $exception
* @param mixed ...$parameters
* @return TValue
* @return ($condition is true ? TValue : never)
*
* @throws TException
*/
Expand Down

0 comments on commit 944adf6

Please sign in to comment.