diff --git a/Inject/ContainerParams.php b/Inject/ContainerParams.php index f833690..9bf557e 100644 --- a/Inject/ContainerParams.php +++ b/Inject/ContainerParams.php @@ -25,7 +25,7 @@ class ContainerParams implements InjectParameterInterface * @return mixed|null * @throws \Exception */ - public function dispatch(): mixed + public function dispatch(object $class, string $method): mixed { return Container::instance()->get($this->value); } diff --git a/Inject/ServiceParams.php b/Inject/ServiceParams.php index 576fa2e..417fd79 100644 --- a/Inject/ServiceParams.php +++ b/Inject/ServiceParams.php @@ -27,7 +27,7 @@ class ServiceParams implements InjectParameterInterface * @return mixed|null * @throws Exception */ - public function dispatch(): mixed + public function dispatch(object $class, string $method): mixed { $service = Container::instance()->get(LocalService::class); diff --git a/Interface/InjectParameterInterface.php b/Interface/InjectParameterInterface.php index d00e10d..afb5fa4 100644 --- a/Interface/InjectParameterInterface.php +++ b/Interface/InjectParameterInterface.php @@ -7,6 +7,11 @@ interface InjectParameterInterface { - public function dispatch(): mixed; + /** + * @param object $class + * @param string $method + * @return mixed + */ + public function dispatch(object $class, string $method): mixed; }