File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 21
21
class BufferedBundleReader implements BundleReaderInterface
22
22
{
23
23
private $ reader ;
24
+ /** @var RingBuffer<string, mixed> */
24
25
private $ buffer ;
25
26
26
27
/**
Original file line number Diff line number Diff line change 22
22
*
23
23
* @author Bernhard Schussek <bschussek@gmail.com>
24
24
*
25
+ * @template TKey of array-key
26
+ * @template TValue
27
+ *
28
+ * @implements \ArrayAccess<TKey, TValue>
29
+ *
25
30
* @internal
26
31
*/
27
32
class RingBuffer implements \ArrayAccess
28
33
{
34
+ /**
35
+ * @var array<int, TValue>
36
+ */
29
37
private $ values = [];
30
38
39
+ /**
40
+ * @var array<TKey, int>
41
+ */
31
42
private $ indices = [];
32
43
33
44
private $ cursor = 0 ;
@@ -50,7 +61,7 @@ public function offsetExists($key): bool
50
61
/**
51
62
* {@inheritdoc}
52
63
*
53
- * @return mixed
64
+ * @return TValue
54
65
*/
55
66
#[\ReturnTypeWillChange]
56
67
public function offsetGet ($ key )
You can’t perform that action at this time.
0 commit comments