Replace int|string key types with array-key in PHPStan/Psalm annotations (#20443)

This commit is contained in:
Максим Спирков
2025-07-11 20:17:54 +05:00
committed by Alexander Makarov
parent 00cd4de125
commit 0cebd2a5b2
3 changed files with 8 additions and 8 deletions

View File

@ -462,8 +462,8 @@ class Component extends BaseObject
*
* @return array the behavior configurations.
*
* @phpstan-return array<int|string, class-string|array{class: class-string, ...}>
* @psalm-return array<int|string, class-string|array{class: class-string, ...}>
* @phpstan-return array<array-key, class-string|array{class: class-string, ...}>
* @psalm-return array<array-key, class-string|array{class: class-string, ...}>
*/
public function behaviors()
{

View File

@ -161,8 +161,8 @@ class Model extends Component implements StaticInstanceInterface, IteratorAggreg
* @return array validation rules
* @see scenarios()
*
* @phpstan-return array<int|string, mixed>[]
* @psalm-return array<int|string, mixed>[]
* @phpstan-return array<array-key, mixed>[]
* @psalm-return array<array-key, mixed>[]
*/
public function rules()
{

View File

@ -102,8 +102,8 @@ class AssetBundle extends BaseObject
*
* Note that only a forward slash "/" should be used as directory separator.
*
* @phpstan-var (string|array<int|string, mixed>)[]
* @psalm-var (string|array<int|string, mixed>)[]
* @phpstan-var (string|array<array-key, mixed>)[]
* @psalm-var (string|array<array-key, mixed>)[]
*/
public $js = [];
/**
@ -112,8 +112,8 @@ class AssetBundle extends BaseObject
*
* Note that only a forward slash "/" should be used as directory separator.
*
* @phpstan-var (string|array<int|string, mixed>)[]
* @psalm-var (string|array<int|string, mixed>)[]
* @phpstan-var (string|array<array-key, mixed>)[]
* @psalm-var (string|array<array-key, mixed>)[]
*/
public $css = [];
/**