Skip to content

Commit 88c896a

Browse files
committed
Refactor docblock for throw_if/throw_unless
1 parent d342bbe commit 88c896a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Illuminate/Support/helpers.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,10 @@ function tap($value, $callback = null)
400400
* @template TValue
401401
* @template TParams of mixed
402402
* @template TException of \Throwable
403+
* @template TExceptionValue of TException|class-string<TException>|string
403404
*
404405
* @param TValue $condition
405-
* @param TException|\Closure(TParams): mixed|class-string<TException>|string $exception
406+
* @param Closure(TParams): TExceptionValue|TExceptionValue $exception
406407
* @param TParams ...$parameters
407408
* @return ($condition is true ? never : ($condition is non-empty-mixed ? never : TValue))
408409
*
@@ -431,11 +432,13 @@ function throw_if($condition, $exception = 'RuntimeException', ...$parameters)
431432
* Throw the given exception unless the given condition is true.
432433
*
433434
* @template TValue
435+
* @template TParams of mixed
434436
* @template TException of \Throwable
437+
* @template TExceptionValue of TException|class-string<TException>|string
435438
*
436439
* @param TValue $condition
437-
* @param TException|class-string<TException>|string $exception
438-
* @param mixed ...$parameters
440+
* @param Closure(TParams): TExceptionValue|TExceptionValue $exception
441+
* @param TParams ...$parameters
439442
* @return ($condition is false ? never : ($condition is non-empty-mixed ? TValue : never))
440443
*
441444
* @throws TException

0 commit comments

Comments
 (0)