Remove invalid @property annotations and fix property descriptions (#20510)

This commit is contained in:
Maksim Spirkov
2025-09-05 02:33:39 +05:00
committed by GitHub
parent f39a2ec1f9
commit f914cda51e
7 changed files with 93 additions and 31 deletions

View File

@ -37,13 +37,25 @@ use yii\validators\Validator;
*
* For more details and usage information on Model, see the [guide article on models](guide:structure-models).
*
* @property-read array $errors Errors for all attributes. This is a two-dimensional
* array of errors for all attributes, similar to the following:
*
* ```php
* [
* 'username' => [
* 'Username is required.',
* 'Username must contain only word characters.',
* ],
* 'email' => [
* 'Email address is invalid.',
* ]
* ]
* ```
*
* Empty array if no errors.
* @property-read \yii\validators\Validator[] $activeValidators The validators applicable to the current
* [[scenario]].
* @property array $attributes Attribute values (name => value).
* @property-read array $errors Errors for all attributes or the specified attribute. Empty array is returned
* if no error. See [[getErrors()]] for detailed description. Note that when returning errors for all attributes,
* the result is a two-dimensional array, like the following: ```php [ 'username' => [ 'Username is required.',
* 'Username must contain only word characters.', ], 'email' => [ 'Email address is invalid.', ] ] ```.
* @property-read array $firstErrors The first errors. The array keys are the attribute names, and the array
* values are the corresponding error messages. An empty array will be returned if there is no error.
* @property-read ArrayIterator $iterator An iterator for traversing the items in the list.
@ -585,7 +597,6 @@ class Model extends Component implements StaticInstanceInterface, IteratorAggreg
* Returns the errors for all attributes or a single attribute.
* @param string|null $attribute attribute name. Use null to retrieve errors for all attributes.
* @return array errors for all attributes or the specified attribute. Empty array is returned if no error.
* See [[getErrors()]] for detailed description.
* Note that when returning errors for all attributes, the result is a two-dimensional array, like the following:
*
* ```php

View File

@ -381,9 +381,6 @@ class Module extends ServiceLocator
* Defines path aliases.
* This method calls [[Yii::setAlias()]] to register the path aliases.
* This method is provided so that you can define path aliases when configuring a module.
* @property array list of path aliases to be defined. The array keys are alias names
* (must start with `@`) and the array values are the corresponding paths or aliases.
* See [[setAliases()]] for an example.
* @param array $aliases list of path aliases to be defined. The array keys are alias names
* (must start with `@`) and the array values are the corresponding paths or aliases.
* For example,