From 113756db30fcbffe9e90b54c29e78dee0676109f Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 19 Oct 2021 17:11:53 +0200 Subject: Fix ArrayAccess and JsonSerializable return types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet --- lib/private/AppFramework/Http/Request.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/private/AppFramework/Http') diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index a95fd208155..c67500bcaa4 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -199,6 +199,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @param string $offset * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->items['parameters'][$offset]) ? $this->items['parameters'][$offset] @@ -210,7 +211,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @param string $offset * @param mixed $value */ - public function offsetSet($offset, $value) { + public function offsetSet($offset, $value): void { throw new \RuntimeException('You cannot change the contents of the request object'); } @@ -218,7 +219,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @see offsetExists * @param string $offset */ - public function offsetUnset($offset) { + public function offsetUnset($offset): void { throw new \RuntimeException('You cannot change the contents of the request object'); } -- cgit v1.2.3