diff --git a/GenericRuntime.php b/GenericRuntime.php index f1b3254..645c7b1 100644 --- a/GenericRuntime.php +++ b/GenericRuntime.php @@ -83,7 +83,7 @@ public function __construct(array $options = []) $this->options = $options; } - public function getResolver(callable $callable, \ReflectionFunction $reflector = null): ResolverInterface + public function getResolver(callable $callable, ?\ReflectionFunction $reflector = null): ResolverInterface { $callable = $callable(...); $parameters = ($reflector ?? new \ReflectionFunction($callable))->getParameters(); diff --git a/RuntimeInterface.php b/RuntimeInterface.php index 757468c..f151757 100644 --- a/RuntimeInterface.php +++ b/RuntimeInterface.php @@ -23,7 +23,7 @@ interface RuntimeInterface * * The callable itself should return an object that represents the application to pass to the getRunner() method. */ - public function getResolver(callable $callable, \ReflectionFunction $reflector = null): ResolverInterface; + public function getResolver(callable $callable, ?\ReflectionFunction $reflector = null): ResolverInterface; /** * Returns a callable that knows how to run the passed object and that returns its exit status as int.