From c2e310320b7751a959f1590bb76530abbcfd2ce6 Mon Sep 17 00:00:00 2001 From: rowhel95 Date: Fri, 11 Feb 2022 12:14:20 +0100 Subject: [PATCH] PHP 8.1 fix (#495) * PHP 8.1 fix * Use supported return types --- src/DebugBar/DataCollector/AggregatedCollector.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/DebugBar/DataCollector/AggregatedCollector.php b/src/DebugBar/DataCollector/AggregatedCollector.php index c1fd96a..a289f43 100644 --- a/src/DebugBar/DataCollector/AggregatedCollector.php +++ b/src/DebugBar/DataCollector/AggregatedCollector.php @@ -155,7 +155,7 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess * @param mixed $value * @throws DebugBarException */ - public function offsetSet($key, $value) + public function offsetSet($key, $value): void { throw new DebugBarException("AggregatedCollector[] is read-only"); } @@ -164,6 +164,8 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess * @param mixed $key * @return mixed */ + + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->collectors[$key]; @@ -173,7 +175,7 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess * @param mixed $key * @return bool */ - public function offsetExists($key) + public function offsetExists($key): bool { return isset($this->collectors[$key]); } @@ -182,7 +184,7 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess * @param mixed $key * @throws DebugBarException */ - public function offsetUnset($key) + public function offsetUnset($key): void { throw new DebugBarException("AggregatedCollector[] is read-only"); }