1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Document ArrayAccess in PHP-DS (#4401)

This commit is contained in:
Benjamin Morel 2020-10-23 02:28:39 +02:00 committed by Daniil Gentili
parent 6a8a660efc
commit c4d1ee7cb1
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -2,6 +2,7 @@
namespace Ds; namespace Ds;
use ArrayAccess;
use Countable; use Countable;
use JsonSerializable; use JsonSerializable;
use OutOfBoundsException; use OutOfBoundsException;
@ -165,8 +166,9 @@ final class Deque implements Sequence
* @template TKey * @template TKey
* @template TValue * @template TValue
* @implements Collection<TKey, TValue> * @implements Collection<TKey, TValue>
* @implements ArrayAccess<TKey, TValue>
*/ */
final class Map implements Collection final class Map implements Collection, ArrayAccess
{ {
/** /**
* @param iterable<TKey, TValue> $values * @param iterable<TKey, TValue> $values
@ -456,8 +458,9 @@ final class Pair implements JsonSerializable
/** /**
* @template TValue * @template TValue
* @extends Collection<int, TValue> * @extends Collection<int, TValue>
* @extends ArrayAccess<int, TValue>
*/ */
interface Sequence extends Collection interface Sequence extends Collection, ArrayAccess
{ {
/** /**
* @param callable(TValue): TValue $callback * @param callable(TValue): TValue $callback
@ -882,8 +885,9 @@ final class Set implements Collection
/** /**
* @template TValue * @template TValue
* @implements Collection<int, TValue> * @implements Collection<int, TValue>
* @implements ArrayAccess<int, TValue>
*/ */
final class Stack implements Collection final class Stack implements Collection, ArrayAccess
{ {
/** /**
* @param iterable<TValue> $values * @param iterable<TValue> $values