@@ -18,6 +18,7 @@ public function __construct(
1818 private array $ values ,
1919 ) {}
2020
21+ #[\Override]
2122 public function withValue (string $ key , mixed $ value ): ContextInterface
2223 {
2324 $ ctx = clone $ this ;
@@ -26,16 +27,19 @@ public function withValue(string $key, mixed $value): ContextInterface
2627 return $ ctx ;
2728 }
2829
30+ #[\Override]
2931 public function getValue (string $ key , mixed $ default = null ): mixed
3032 {
3133 return $ this ->values [$ key ] ?? $ default ;
3234 }
3335
36+ #[\Override]
3437 public function getValues (): array
3538 {
3639 return $ this ->values ;
3740 }
3841
42+ #[\Override]
3943 public function offsetExists (mixed $ offset ): bool
4044 {
4145 \assert (\is_string ($ offset ), 'Offset argument must be a type of string ' );
@@ -49,32 +53,37 @@ public function offsetExists(mixed $offset): bool
4953 return isset ($ this ->values [$ offset ]) || \array_key_exists ($ offset , $ this ->values );
5054 }
5155
56+ #[\Override]
5257 public function offsetGet (mixed $ offset ): mixed
5358 {
5459 \assert (\is_string ($ offset ), 'Offset argument must be a type of string ' );
5560
5661 return $ this ->values [$ offset ] ?? null ;
5762 }
5863
64+ #[\Override]
5965 public function offsetSet (mixed $ offset , mixed $ value ): void
6066 {
6167 \assert (\is_string ($ offset ), 'Offset argument must be a type of string ' );
6268
6369 $ this ->values [$ offset ] = $ value ;
6470 }
6571
72+ #[\Override]
6673 public function offsetUnset (mixed $ offset ): void
6774 {
6875 \assert (\is_string ($ offset ), 'Offset argument must be a type of string ' );
6976
7077 unset($ this ->values [$ offset ]);
7178 }
7279
80+ #[\Override]
7381 public function getIterator (): \Traversable
7482 {
7583 return new \ArrayIterator ($ this ->values );
7684 }
7785
86+ #[\Override]
7887 public function count (): int
7988 {
8089 return \count ($ this ->values );
0 commit comments