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/StudipArrayObject.class.php | |
| parent | fef7d9367736f3b33b0318da237ab024841c4f3f (diff) | |
return type adjustments, fixes #2290
Closes #2290
Merge request studip/studip!1514
Diffstat (limited to 'lib/classes/StudipArrayObject.class.php')
| -rw-r--r-- | lib/classes/StudipArrayObject.class.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/classes/StudipArrayObject.class.php b/lib/classes/StudipArrayObject.class.php index f025ffb..fe9aad1 100644 --- a/lib/classes/StudipArrayObject.class.php +++ b/lib/classes/StudipArrayObject.class.php @@ -159,7 +159,10 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, * Get the number of public properties in the ArrayObject * * @return int + * + * @todo Add int return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function count() { return count($this->storage); @@ -215,7 +218,10 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, * Create a new iterator from an ArrayObject instance * * @return \Iterator + * + * @todo Add Traversable return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function getIterator() { $class = $this->iteratorClass; @@ -268,7 +274,10 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, * * @param mixed $key * @return bool + * + * @todo Add void return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function offsetExists($key) { return isset($this->storage[$key]); @@ -279,7 +288,10 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, * * @param mixed $key * @return mixed + * + * @todo Add mixed return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function offsetGet($key) { $ret = null; @@ -297,7 +309,10 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, * @param mixed $key * @param mixed $value * @return void + * + * @todo Add void return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function offsetSet($key, $value) { if (is_null($key)) { @@ -312,7 +327,10 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, * * @param mixed $key * @return void + * + * @todo Add void return type when Stud.IP requires PHP8 minimal */ + #[ReturnTypeWillChange] public function offsetUnset($key) { if ($this->offsetExists($key)) { |
