Add generic types for ActiveRecord and Container (#20325)

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
This commit is contained in:
Dmitriy Derepko
2025-02-21 19:00:43 +03:00
committed by GitHub
parent 1c191eac90
commit 06bd683d21
4 changed files with 43 additions and 3 deletions

View File

@ -157,6 +157,13 @@ class Container extends Component
* @return object an instance of the requested class.
* @throws InvalidConfigException if the class cannot be recognized or correspond to an invalid definition
* @throws NotInstantiableException If resolved to an abstract class or an interface (since 2.0.9)
*
*
* @template T of class-string
* @psalm-param class-string<T>|array{class: class-string<T>} $class
* @phpstan-param class-string<T>|array{class: class-string<T>} $class
* @psalm-return T
* @phpstan-return T
*/
public function get($class, $params = [], $config = [])
{