Fix #20654: Add missing generics in yii\db namespace. Fix PHPDoc annotations in yii\db\ArrayExpression

This commit is contained in:
Maksim Spirkov
2025-10-29 14:42:19 +03:00
committed by GitHub
parent 6238940918
commit 5dcf4b853d
16 changed files with 98 additions and 34 deletions

View File

@@ -25,6 +25,9 @@ use yii\base\InvalidConfigException;
* @author Dmytro Naumenko <d.naumenko.a@gmail.com>
* @since 2.0.14
* @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore
*
* @implements \ArrayAccess<array-key, mixed>
* @implements \IteratorAggregate<array-key, mixed>
*/
class ArrayExpression implements ExpressionInterface, \ArrayAccess, \Countable, \IteratorAggregate
{
@@ -96,7 +99,7 @@ class ArrayExpression implements ExpressionInterface, \ArrayAccess, \Countable,
* Whether a offset exists
*
* @link https://www.php.net/manual/en/arrayaccess.offsetexists.php
* @param mixed $offset <p>
* @param int|string $offset <p>
* An offset to check for.
* </p>
* @return bool true on success or false on failure.
@@ -115,7 +118,7 @@ class ArrayExpression implements ExpressionInterface, \ArrayAccess, \Countable,
* Offset to retrieve
*
* @link https://www.php.net/manual/en/arrayaccess.offsetget.php
* @param mixed $offset <p>
* @param int|string $offset <p>
* The offset to retrieve.
* </p>
* @return mixed Can return all value types.
@@ -131,7 +134,7 @@ class ArrayExpression implements ExpressionInterface, \ArrayAccess, \Countable,
* Offset to set
*
* @link https://www.php.net/manual/en/arrayaccess.offsetset.php
* @param mixed $offset <p>
* @param int|string $offset <p>
* The offset to assign the value to.
* </p>
* @param mixed $value <p>
@@ -150,7 +153,7 @@ class ArrayExpression implements ExpressionInterface, \ArrayAccess, \Countable,
* Offset to unset
*
* @link https://www.php.net/manual/en/arrayaccess.offsetunset.php
* @param mixed $offset <p>
* @param int|string $offset <p>
* The offset to unset.
* </p>
* @return void