mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
chore: refactor TestClosureMustNotBeStatic
This commit is contained in:
@ -221,7 +221,8 @@ final class TestCaseFactory
|
||||
$method->closure instanceof \Closure &&
|
||||
(new \ReflectionFunction($method->closure))->isStatic()
|
||||
) {
|
||||
throw new TestClosureMustNotBeStatic("The test `$method->description` closure must not be static in $method->filename.");
|
||||
|
||||
throw new TestClosureMustNotBeStatic($method);
|
||||
}
|
||||
|
||||
if (! $method->receivesArguments()) {
|
||||
|
||||
Reference in New Issue
Block a user