diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-03-10 18:45:14 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2023-03-10 18:45:14 +0000 |
| commit | 01ebc410441ae59c684381c175217281c2d78edd (patch) | |
| tree | 75ae7153be87bfc53861abe13cee4ad9f2eab703 /lib/classes/UserDataAdapter.php | |
| parent | fef7d9367736f3b33b0318da237ab024841c4f3f (diff) | |
return type adjustments, fixes #2290
Closes #2290
Merge request studip/studip!1514
Diffstat (limited to 'lib/classes/UserDataAdapter.php')
| -rw-r--r-- | lib/classes/UserDataAdapter.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/classes/UserDataAdapter.php b/lib/classes/UserDataAdapter.php index db93619..0a0c3be 100644 --- a/lib/classes/UserDataAdapter.php +++ b/lib/classes/UserDataAdapter.php @@ -26,7 +26,10 @@ class UserDataAdapter implements ArrayAccess, Countable, IteratorAggregate /** * ArrayAccess: Check whether the given offset exists. + * + * @todo Add bool return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function offsetExists($offset) { return $this->user->offsetExists($this->adaptOffset($offset)); @@ -34,7 +37,10 @@ class UserDataAdapter implements ArrayAccess, Countable, IteratorAggregate /** * ArrayAccess: Get the value at the given offset. + * + * @todo Add mixed return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function offsetGet($offset) { return $this->user->offsetGet($this->adaptOffset($offset)); @@ -42,23 +48,32 @@ class UserDataAdapter implements ArrayAccess, Countable, IteratorAggregate /** * ArrayAccess: Set the value at the given offset. + * + * @todo Add void return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function offsetSet($offset, $value) { - return $this->user->offsetSet($this->adaptOffset($offset), $value); + $this->user->offsetSet($this->adaptOffset($offset), $value); } /** * ArrayAccess: unset the value at the given offset. + * + * @todo Add void return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function offsetUnset($offset) { - return $this->user->offsetUnset($this->adaptOffset($offset)); + $this->user->offsetUnset($this->adaptOffset($offset)); } /** * @see Countable::count() + * + * @todo Add int return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function count() { return $this->user->count(); @@ -66,7 +81,10 @@ class UserDataAdapter implements ArrayAccess, Countable, IteratorAggregate /** * @see IteratorAggregate::getIterator() + * + * @todo Add Traversable return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function getIterator() { return $this->user->getIterator(); |
