Skip to content

Commit e985e27

Browse files
vojtech-dobesdg
authored andcommitted
used generics for Container::createInstance() (#323)
1 parent 8bdd853 commit e985e27

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/DI/Container.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ private function preventDeadLock(string $key, \Closure $callback): mixed
320320

321321
/**
322322
* Creates an instance of the class and passes dependencies to the constructor using autowiring.
323+
* @template T of object
324+
* @param class-string<T> $class
325+
* @return T
323326
*/
324327
public function createInstance(string $class, array $args = []): object
325328
{

0 commit comments

Comments
 (0)