diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-06 08:50:32 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2024-05-06 08:50:32 +0000 |
| commit | c659d71e33cecbe42a7038c281c082f4b5c98414 (patch) | |
| tree | 6bb722750e822599723045082449d2e63034dd6f /lib/activities | |
| parent | f8d42374860009922ee68bd9aba63e50f66e77df (diff) | |
adjustments for php8, fixes #4111
Closes #4111
Merge request studip/studip!2956
Diffstat (limited to 'lib/activities')
| -rw-r--r-- | lib/activities/Stream.php | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/lib/activities/Stream.php b/lib/activities/Stream.php index 6b64eff..b1472ef 100644 --- a/lib/activities/Stream.php +++ b/lib/activities/Stream.php @@ -79,66 +79,48 @@ class Stream 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) + public function offsetExists($offset): bool { return isset($this->activities[$offset]); } /** * ArrayAccess: Get the value at the given offset. - * - * @todo Add mixed return type when Stud.IP requires PHP8 minimal */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return $this->activities[$offset]; } /** * 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) + public function offsetSet($offset, $value): void { $this->activities[$offset] = $value; } /** * ArrayAccess: unset the value at the given offset (not applicable) - * - * @todo Add void return type when Stud.IP requires PHP8 minimal */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->activities[$offset]); } /** * IteratorAggregate - * - * @todo Add \Traversable return type when Stud.IP requires PHP8 minimal */ - #[\ReturnTypeWillChange] - public function getIterator() + public function getIterator(): \Traversable { return new \ArrayIterator($this->activities); } /** * Countable - * - * @todo Add int return type when Stud.IP requires PHP8 minimal */ - #[ReturnTypeWillChange] - public function count() + public function count(): int { return count($this->activities); } |
