lint/laravel/prefer-throw-if
Not in any preset. In Rector’s rector-laravel/laravel-if-helpers set. Needs the laravel extension. Unsafe fix: it can change behavior.
What it does
Change if throw to throw_if
Configuration
[lint.rules]
"laravel/prefer-throw-if" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
ThrowIf(rector-laravel)