mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
Add generic types for ActiveRecord and Container (#20325)
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
This commit is contained in:
@ -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 = [])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user