diff --git a/src/Illuminate/Container/Container.php b/src/Illuminate/Container/Container.php index 58f5b89e064e..d756758d7815 100755 --- a/src/Illuminate/Container/Container.php +++ b/src/Illuminate/Container/Container.php @@ -488,9 +488,11 @@ public function extend($abstract, Closure $closure) /** * Register an existing instance as shared in the container. * + * @template TInstance + * * @param string $abstract - * @param mixed $instance - * @return mixed + * @param TInstance $instance + * @return TInstance */ public function instance($abstract, $instance) { diff --git a/src/Illuminate/Contracts/Container/Container.php b/src/Illuminate/Contracts/Container/Container.php index 47c5f8b55278..3273750e6a1e 100644 --- a/src/Illuminate/Contracts/Container/Container.php +++ b/src/Illuminate/Contracts/Container/Container.php @@ -122,9 +122,11 @@ public function extend($abstract, Closure $closure); /** * Register an existing instance as shared in the container. * + * @template TInstance + * * @param string $abstract - * @param mixed $instance - * @return mixed + * @param TInstance $instance + * @return TInstance */ public function instance($abstract, $instance); diff --git a/types/Container/Container.php b/types/Container/Container.php new file mode 100644 index 000000000000..dae598e6c3bb --- /dev/null +++ b/types/Container/Container.php @@ -0,0 +1,10 @@ +instance('request', Request::capture())); diff --git a/types/Contracts/Container/Container.php b/types/Contracts/Container/Container.php new file mode 100644 index 000000000000..3d413a586c7c --- /dev/null +++ b/types/Contracts/Container/Container.php @@ -0,0 +1,10 @@ +instance('request', Request::capture()));