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 2121class BufferedBundleReader implements BundleReaderInterface
2222{
2323 private $ reader ;
24+ /** @var RingBuffer<string, mixed> */
2425 private $ buffer ;
2526
2627 /**
Original file line number Diff line number Diff line change 2222 *
2323 * @author Bernhard Schussek <bschussek@gmail.com>
2424 *
25+ * @template TKey of array-key
26+ * @template TValue
27+ *
28+ * @implements \ArrayAccess<TKey, TValue>
29+ *
2530 * @internal
2631 */
2732class RingBuffer implements \ArrayAccess
2833{
34+ /**
35+ * @var array<int, TValue>
36+ */
2937 private $ values = [];
3038
39+ /**
40+ * @var array<TKey, int>
41+ */
3142 private $ indices = [];
3243
3344 private $ cursor = 0 ;
@@ -50,7 +61,7 @@ public function offsetExists($key): bool
5061 /**
5162 * {@inheritdoc}
5263 *
53- * @return mixed
64+ * @return TValue
5465 */
5566 #[\ReturnTypeWillChange]
5667 public function offsetGet ($ key )
You can’t perform that action at this time.
0 commit comments