Skip to content

Commit 1a51a8f

Browse files
committed
Merge branch '4.4' into 5.3
* 4.4: Fix return types for PHP 8.1
2 parents f1d1420 + 296e5e1 commit 1a51a8f

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

Data/Util/ArrayAccessibleResourceBundle.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,21 @@ public function offsetExists($offset): bool
4545
}
4646

4747
/**
48+
* @param mixed $offset
4849
* @return mixed
4950
*/
51+
#[\ReturnTypeWillChange]
5052
public function offsetGet($offset)
5153
{
5254
return $this->get($offset);
5355
}
5456

55-
/**
56-
* @return void
57-
*/
58-
public function offsetSet($offset, $value)
57+
public function offsetSet($offset, $value): void
5958
{
6059
throw new BadMethodCallException('Resource bundles cannot be modified.');
6160
}
6261

63-
/**
64-
* @return void
65-
*/
66-
public function offsetUnset($offset)
62+
public function offsetUnset($offset): void
6763
{
6864
throw new BadMethodCallException('Resource bundles cannot be modified.');
6965
}

Data/Util/RingBuffer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function offsetExists($key): bool
5252
*
5353
* @return mixed
5454
*/
55+
#[\ReturnTypeWillChange]
5556
public function offsetGet($key)
5657
{
5758
if (!isset($this->indices[$key])) {
@@ -66,7 +67,7 @@ public function offsetGet($key)
6667
*
6768
* @return void
6869
*/
69-
public function offsetSet($key, $value)
70+
public function offsetSet($key, $value): void
7071
{
7172
if (false !== ($keyToRemove = array_search($this->cursor, $this->indices))) {
7273
unset($this->indices[$keyToRemove]);
@@ -83,7 +84,7 @@ public function offsetSet($key, $value)
8384
*
8485
* @return void
8586
*/
86-
public function offsetUnset($key)
87+
public function offsetUnset($key): void
8788
{
8889
if (isset($this->indices[$key])) {
8990
$this->values[$this->indices[$key]] = null;

0 commit comments

Comments
 (0)