mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-06 15:28:58 +01:00
Replace $this with static and covariant static in generics (#20733)
This commit is contained in:
@@ -575,11 +575,11 @@ class Module extends ServiceLocator
|
||||
* part of the route which will be treated as the action ID. Otherwise, `false` will be returned.
|
||||
*
|
||||
* @param string $route the route consisting of module, controller and action IDs.
|
||||
* @return array{Controller<$this>, string}|false If the controller is created successfully, it will be returned together
|
||||
* @return array{Controller<static>, string}|false If the controller is created successfully, it will be returned together
|
||||
* with the requested action ID. Otherwise `false` will be returned.
|
||||
* @throws InvalidConfigException if the controller class and its file do not match.
|
||||
*
|
||||
* @phpstan-return array{Controller<$this>, string}|false
|
||||
* @phpstan-return array{Controller<static>, string}|false
|
||||
* @psalm-return array{Controller<self>, string}|false
|
||||
*/
|
||||
public function createController($route)
|
||||
@@ -634,11 +634,11 @@ class Module extends ServiceLocator
|
||||
* Note that this method does not check [[modules]] or [[controllerMap]].
|
||||
*
|
||||
* @param string $id the controller ID.
|
||||
* @return Controller<$this>|null the newly created controller instance, or `null` if the controller ID is invalid.
|
||||
* @return Controller<static>|null the newly created controller instance, or `null` if the controller ID is invalid.
|
||||
* @throws InvalidConfigException if the controller class and its file name do not match.
|
||||
* This exception is only thrown when in debug mode.
|
||||
*
|
||||
* @phpstan-return Controller<$this>|null
|
||||
* @phpstan-return Controller<static>|null
|
||||
* @psalm-return Controller<self>|null
|
||||
*/
|
||||
public function createControllerByID($id)
|
||||
@@ -717,10 +717,10 @@ class Module extends ServiceLocator
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param Action<Controller<$this>> $action the action to be executed.
|
||||
* @param Action<Controller<static>> $action the action to be executed.
|
||||
* @return bool whether the action should continue to be executed.
|
||||
*
|
||||
* @phpstan-param Action<Controller<$this>> $action
|
||||
* @phpstan-param Action<Controller<static>> $action
|
||||
* @psalm-param Action<Controller<self>> $action
|
||||
*/
|
||||
public function beforeAction($action)
|
||||
@@ -747,11 +747,11 @@ class Module extends ServiceLocator
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param Action<Controller<$this>> $action the action just executed.
|
||||
* @param Action<Controller<static>> $action the action just executed.
|
||||
* @param mixed $result the action return result.
|
||||
* @return mixed the processed action result.
|
||||
*
|
||||
* @phpstan-param Action<Controller<$this>> $action
|
||||
* @phpstan-param Action<Controller<static>> $action
|
||||
* @psalm-param Action<Controller<self>> $action
|
||||
*/
|
||||
public function afterAction($action, $result)
|
||||
|
||||
Reference in New Issue
Block a user