mirror of
https://github.com/pestphp/pest.git
synced 2026-04-21 14:37:29 +02:00
chore: code refactor
This commit is contained in:
@ -921,7 +921,7 @@ final class Expectation
|
||||
|
||||
if ($exception instanceof Closure) {
|
||||
$callback = $exception;
|
||||
$parameters = (new ReflectionFunction($exception))->getParameters();
|
||||
$parameters = new ReflectionFunction($exception)->getParameters();
|
||||
|
||||
if (count($parameters) !== 1) {
|
||||
throw new InvalidArgumentException('The given closure must have a single parameter type-hinted as the class string.');
|
||||
|
||||
Reference in New Issue
Block a user