Fix #20513: Fix code examples in PHPDoc

This commit is contained in:
Maksim Spirkov
2025-09-06 02:22:56 +05:00
committed by GitHub
parent a6a7f0128a
commit 53256fdd24
186 changed files with 579 additions and 520 deletions

View File

@ -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);