Skip to content

Commit c2e3103

Browse files
authored
PHP 8.1 fix (php-debugbar#495)
* PHP 8.1 fix * Use supported return types
1 parent 70e8062 commit c2e3103

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/DebugBar/DataCollector/AggregatedCollector.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function getName()
155155
* @param mixed $value
156156
* @throws DebugBarException
157157
*/
158-
public function offsetSet($key, $value)
158+
public function offsetSet($key, $value): void
159159
{
160160
throw new DebugBarException("AggregatedCollector[] is read-only");
161161
}
@@ -164,6 +164,8 @@ public function offsetSet($key, $value)
164164
* @param mixed $key
165165
* @return mixed
166166
*/
167+
168+
#[\ReturnTypeWillChange]
167169
public function offsetGet($key)
168170
{
169171
return $this->collectors[$key];
@@ -173,7 +175,7 @@ public function offsetGet($key)
173175
* @param mixed $key
174176
* @return bool
175177
*/
176-
public function offsetExists($key)
178+
public function offsetExists($key): bool
177179
{
178180
return isset($this->collectors[$key]);
179181
}
@@ -182,7 +184,7 @@ public function offsetExists($key)
182184
* @param mixed $key
183185
* @throws DebugBarException
184186
*/
185-
public function offsetUnset($key)
187+
public function offsetUnset($key): void
186188
{
187189
throw new DebugBarException("AggregatedCollector[] is read-only");
188190
}

0 commit comments

Comments
 (0)