Fix #20671: Fix PHPDoc annotations in yii\base, yii\console, yii\web and yii\widgets namespaces

This commit is contained in:
Maksim Spirkov
2025-11-02 11:35:27 +03:00
committed by GitHub
parent d1556e323e
commit 1fdcebaeec
8 changed files with 14 additions and 13 deletions

View File

@@ -64,7 +64,7 @@ class MaskedInput extends InputWidget
*/
public $mask;
/**
* @var array custom mask definitions to use. Should be configured as `maskSymbol => settings`, where
* @var array|null custom mask definitions to use. Should be configured as `maskSymbol => settings`, where
*
* - `maskSymbol` is a string, containing a character to identify your mask definition and
* - `settings` is an array, consisting of the following entries:
@@ -75,7 +75,7 @@ class MaskedInput extends InputWidget
*/
public $definitions;
/**
* @var array custom aliases to use. Should be configured as `maskAlias => settings`, where
* @var array|null custom aliases to use. Should be configured as `maskAlias => settings`, where
*
* - `maskAlias` is a string containing a text to identify your mask alias definition (e.g. 'phone') and
* - `settings` is an array containing settings for the mask symbol, exactly similar to parameters as passed in [[clientOptions]].
@@ -99,7 +99,7 @@ class MaskedInput extends InputWidget
public $type = 'text';
/**
* @var string the hashed variable to store the pluginOptions
* @var string|null the hashed variable to store the pluginOptions
*/
protected $_hashVar;
/**
@@ -196,10 +196,10 @@ class MaskedInput extends InputWidget
$this->clientOptions['mask'] = $this->mask;
}
$this->hashPluginOptions($view);
if (!empty($this->definitions) && is_array($this->definitions)) {
if (is_array($this->definitions) && !empty($this->definitions)) {
$js .= ucfirst(self::PLUGIN_NAME) . '.extendDefinitions(' . Json::htmlEncode($this->definitions) . ');';
}
if (!empty($this->aliases) && is_array($this->aliases)) {
if (is_array($this->aliases) && !empty($this->aliases)) {
$js .= ucfirst(self::PLUGIN_NAME) . '.extendAliases(' . Json::htmlEncode($this->aliases) . ');';
}
$id = $this->options['id'];