File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 5252interface IContainer extends ContainerInterface {
5353
5454 /**
55+ * @template T
56+ *
5557 * If a parameter is not registered in the container try to instantiate it
5658 * by using reflection to find out how to build the class
5759 * @param string $name the class name to resolve
60+ * @psalm-param string|class-string<T> $name
5861 * @return \stdClass
62+ * @psalm-return ($name is class-string ? T : mixed)
5963 * @since 8.2.0
6064 * @deprecated 20.0.0 use \Psr\Container\ContainerInterface::get
6165 * @throws ContainerExceptionInterface if the class could not be found or instantiated
@@ -66,9 +70,13 @@ public function resolve($name);
6670 /**
6771 * Look up a service for a given name in the container.
6872 *
73+ * @template T
74+ *
6975 * @param string $name
76+ * @psalm-param string|class-string<T> $name
7077 * @param bool $autoload Should we try to autoload the service. If we are trying to resolve built in types this makes no sense for example
7178 * @return mixed
79+ * @psalm-return ($name is class-string ? T : mixed)
7280 * @throws ContainerExceptionInterface if the query could not be resolved
7381 * @throws QueryException if the query could not be resolved
7482 * @since 6.0.0
You can’t perform that action at this time.
0 commit comments