mirror of
https://github.com/yiisoft/yii2.git
synced 2025-10-30 10:08:08 +08:00
Fix #20513: Fix code examples in PHPDoc
This commit is contained in:
@ -77,7 +77,7 @@ class Module extends ServiceLocator
|
||||
* the controller's fully qualified class name, and the rest of the name-value pairs
|
||||
* in the array are used to initialize the corresponding controller properties. For example,
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* [
|
||||
* 'account' => 'app\controllers\UserController',
|
||||
* 'article' => [
|
||||
@ -135,7 +135,7 @@ class Module extends ServiceLocator
|
||||
* Version can be specified as a PHP callback, which can accept module instance as an argument and should
|
||||
* return the actual version. For example:
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* function (Module $module) {
|
||||
* //return string|int
|
||||
* }
|
||||
@ -349,7 +349,7 @@ class Module extends ServiceLocator
|
||||
* Version can be specified as a PHP callback, which can accept module instance as an argument and should
|
||||
* return the actual version. For example:
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* function (Module $module) {
|
||||
* //return string
|
||||
* }
|
||||
@ -385,7 +385,7 @@ class Module extends ServiceLocator
|
||||
* (must start with `@`) and the array values are the corresponding paths or aliases.
|
||||
* For example,
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* [
|
||||
* '@models' => '@app/models', // an existing alias
|
||||
* '@backend' => __DIR__ . '/../backend', // a directory
|
||||
@ -509,7 +509,7 @@ class Module extends ServiceLocator
|
||||
*
|
||||
* The following is an example for registering two sub-modules:
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* [
|
||||
* 'comment' => [
|
||||
* 'class' => 'app\modules\comment\CommentModule',
|
||||
@ -702,7 +702,7 @@ class Module extends ServiceLocator
|
||||
*
|
||||
* If you override this method, your code should look like the following:
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* public function beforeAction($action)
|
||||
* {
|
||||
* if (!parent::beforeAction($action)) {
|
||||
@ -733,7 +733,7 @@ class Module extends ServiceLocator
|
||||
*
|
||||
* If you override this method, your code should look like the following:
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* public function afterAction($action, $result)
|
||||
* {
|
||||
* $result = parent::afterAction($action, $result);
|
||||
|
||||
Reference in New Issue
Block a user