Closed peterfox closed 7 months ago
A nice little rule to change the parameters of throw_if() and throw_unless() to use a class string.
throw_if()
throw_unless()
-throw_if($condition, new MyException('custom message')); +throw_if($condition, MyException::class, 'custom message');
Changes
Why
A nice little rule to change the parameters of
throw_if()
andthrow_unless()
to use a class string.