Fix #20508: Fix PHPDoc, add PHPStan/Psalm annotations for yii\web\CookieCollection::getIterator. Add missing @property annotation in yii\base\Model

This commit is contained in:
Maksim Spirkov
2025-09-02 10:10:56 +05:00
committed by GitHub
parent 9b417e5f6d
commit 06858c1089
7 changed files with 42 additions and 14 deletions

View File

@ -52,7 +52,10 @@ class CookieCollection extends BaseObject implements \IteratorAggregate, \ArrayA
* Returns an iterator for traversing the cookies in the collection.
* This method is required by the SPL interface [[\IteratorAggregate]].
* It will be implicitly called when you use `foreach` to traverse the collection.
* @return ArrayIterator<string, Cookie> an iterator for traversing the cookies in the collection.
* @return ArrayIterator an iterator for traversing the cookies in the collection.
*
* @phpstan-return ArrayIterator<string, Cookie>
* @psalm-return ArrayIterator<string, Cookie>
*/
#[\ReturnTypeWillChange]
public function getIterator()