1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Merge pull request #10190 from boesing/feature/array-object-array-key

This commit is contained in:
Bruce Weirdan 2023-09-10 20:09:10 +03:00 committed by GitHub
commit ea1664f30b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View File

@ -125,7 +125,7 @@ interface ArrayAccess {
* This class allows objects to work as arrays.
* @link http://php.net/manual/en/class.arrayobject.php
*
* @template TKey
* @template TKey of array-key
* @template TValue
* @template-implements IteratorAggregate<TKey, TValue>
* @template-implements ArrayAccess<TKey, TValue>

View File

@ -1297,7 +1297,6 @@ class ArrayAssignmentTest extends TestCase
/**
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArrayOffset
*/
foreach ($a as $k => $v) {
$arr[$k] = $v;

View File

@ -640,7 +640,7 @@ class ClassTest extends TestCase
'code' => '<?php
/**
* @template TTKey
* @template TTKey of array-key
* @template TTValue
*
* @extends ArrayObject<TTKey, TTValue>
@ -675,7 +675,7 @@ class ClassTest extends TestCase
'preventDoubleStaticResolution2' => [
'code' => '<?php
/**
* @template TTKey
* @template TTKey of array-key
* @template TTValue
*
* @extends ArrayObject<TTKey, TTValue>
@ -712,7 +712,7 @@ class ClassTest extends TestCase
'preventDoubleStaticResolution3' => [
'code' => '<?php
/**
* @template TTKey
* @template TTKey of array-key
* @template TTValue
*
* @extends ArrayObject<TTKey, TTValue>

View File

@ -1390,7 +1390,7 @@ class ClassTemplateExtendsTest extends TestCase
'extendArrayObjectWithTemplateParams' => [
'code' => '<?php
/**
* @template TKey
* @template TKey of array-key
* @template TValue
* @template-extends \ArrayObject<TKey,TValue>
*/