Mercurial > hg > rc2
comparison program/lib/Roundcube/rcube_result_set.php @ 22:303b85d5b561
More cleaning up php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Wed, 15 Oct 2025 14:06:27 -0400 |
| parents | 4681f974d28b |
| children | bea5a38be938 |
comparison
equal
deleted
inserted
replaced
| 21:73124dd49283 | 22:303b85d5b561 |
|---|---|
| 61 $this->current = $i; | 61 $this->current = $i; |
| 62 } | 62 } |
| 63 | 63 |
| 64 /*** Implement PHP ArrayAccess interface ***/ | 64 /*** Implement PHP ArrayAccess interface ***/ |
| 65 | 65 |
| 66 public function offsetSet($offset, $value) | 66 public function offsetSet(mixed $offset,mixed $value): void |
| 67 { | 67 { |
| 68 if (is_null($offset)) { | 68 if (is_null($offset)) { |
| 69 $offset = count($this->records); | 69 $offset = count($this->records); |
| 70 $this->records[] = $value; | 70 $this->records[] = $value; |
| 71 } | 71 } |
| 72 else { | 72 else { |
| 73 $this->records[$offset] = $value; | 73 $this->records[$offset] = $value; |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 public function offsetExists($offset) | 77 public function offsetExists(mixed $offset): bool |
| 78 { | 78 { |
| 79 return isset($this->records[$offset]); | 79 return isset($this->records[$offset]); |
| 80 } | 80 } |
| 81 | 81 |
| 82 public function offsetUnset($offset) | 82 public function offsetUnset(mixed $offset): void |
| 83 { | 83 { |
| 84 unset($this->records[$offset]); | 84 unset($this->records[$offset]); |
| 85 } | 85 } |
| 86 | 86 |
| 87 public function offsetGet($offset) | 87 public function offsetGet($offset) |
| 89 return $this->records[$offset]; | 89 return $this->records[$offset]; |
| 90 } | 90 } |
| 91 | 91 |
| 92 /*** PHP 5 Iterator interface ***/ | 92 /*** PHP 5 Iterator interface ***/ |
| 93 | 93 |
| 94 function rewind() | 94 function rewind(): void |
| 95 { | 95 { |
| 96 $this->current = 0; | 96 $this->current = 0; |
| 97 } | 97 } |
| 98 | 98 |
| 99 function current() | 99 function current(): mixed |
| 100 { | 100 { |
| 101 return $this->records[$this->current]; | 101 return $this->records[$this->current]; |
| 102 } | 102 } |
| 103 | 103 |
| 104 function key() | 104 function key(): mixed |
| 105 { | 105 { |
| 106 return $this->current; | 106 return $this->current; |
| 107 } | 107 } |
| 108 | 108 |
| 109 #[ReturnTypeWillChange] | |
| 109 function next() | 110 function next() |
| 110 { | 111 { |
| 111 return $this->iterate(); | 112 return $this->iterate(); |
| 112 } | 113 } |
| 113 | 114 |
| 114 function valid() | 115 function valid(): bool |
| 115 { | 116 { |
| 116 return isset($this->records[$this->current]); | 117 return isset($this->records[$this->current]); |
| 117 } | 118 } |
| 118 } | 119 } |
