mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 11:13:59 +02:00
[ticket/17176] Resolve deprecation notices
PHPBB3-17176
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
|
||||
namespace phpbb\request;
|
||||
|
||||
use ReturnTypeWillChange;
|
||||
|
||||
/**
|
||||
* Replacement for a superglobal (like $_GET or $_POST) which calls
|
||||
* trigger_error on all operations but isset, overloads the [] operator with SPL.
|
||||
@@ -74,7 +76,7 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
|
||||
*
|
||||
* @return bool Whether the key on the super global exists.
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return $this->request->is_set($offset, $this->super_global);
|
||||
}
|
||||
@@ -82,17 +84,17 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
|
||||
/**#@+
|
||||
* Part of the \ArrayAccess implementation, will always result in a FATAL error.
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
public function offsetGet($offset): mixed
|
||||
{
|
||||
$this->error();
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value)
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
$this->error();
|
||||
}
|
||||
|
||||
public function offsetUnset($offset)
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
$this->error();
|
||||
}
|
||||
@@ -103,7 +105,7 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
|
||||
* @return void
|
||||
* @psalm-suppress InvalidReturnType
|
||||
*/
|
||||
public function count()
|
||||
public function count(): int
|
||||
{
|
||||
$this->error();
|
||||
}
|
||||
@@ -113,7 +115,7 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
|
||||
* @return void
|
||||
* @psalm-suppress InvalidReturnType
|
||||
*/
|
||||
public function getIterator()
|
||||
#[ReturnTypeWillChange] public function getIterator(): void
|
||||
{
|
||||
$this->error();
|
||||
}
|
||||
|
Reference in New Issue
Block a user