Changeset 60787
- Timestamp:
- 09/20/2025 10:11:36 PM (8 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sodium_compat/src/PHP52/SplFixedArray.php
r49741 r60787 33 33 * @return int 34 34 */ 35 #[\ReturnTypeWillChange] 35 36 public function count() 36 37 { … … 73 74 * @return int 74 75 */ 76 #[\ReturnTypeWillChange] 75 77 public function getSize() 76 78 { … … 82 84 * @return bool 83 85 */ 86 #[\ReturnTypeWillChange] 84 87 public function setSize($size) 85 88 { … … 92 95 * @return bool 93 96 */ 97 #[\ReturnTypeWillChange] 94 98 public function offsetExists($index) 95 99 { … … 101 105 * @return mixed 102 106 */ 107 #[\ReturnTypeWillChange] 103 108 public function offsetGet($index) 104 109 { … … 112 117 * @psalm-suppress MixedAssignment 113 118 */ 119 #[\ReturnTypeWillChange] 114 120 public function offsetSet($index, $newval) 115 121 { … … 120 126 * @param string|int $index 121 127 */ 128 #[\ReturnTypeWillChange] 122 129 public function offsetUnset($index) 123 130 { … … 131 138 * @since 5.3.0 132 139 */ 140 #[\ReturnTypeWillChange] 133 141 public function rewind() 134 142 { … … 142 150 * @since 5.3.0 143 151 */ 152 #[\ReturnTypeWillChange] 144 153 public function current() 145 154 { … … 152 161 * @return int The current array index. 153 162 */ 163 #[\ReturnTypeWillChange] 154 164 public function key() 155 165 { … … 160 170 * @return void 161 171 */ 172 #[\ReturnTypeWillChange] 162 173 public function next() 163 174 { … … 170 181 * @return bool true if the array contains any more elements, false otherwise. 171 182 */ 183 #[\ReturnTypeWillChange] 172 184 public function valid() 173 185 { … … 180 192 } 181 193 194 public function __sleep() 195 { 196 return $this->internalArray; 197 } 198 182 199 /** 183 200 * Do nothing. … … 187 204 // NOP 188 205 } 206 207 public function __serialize() 208 { 209 return array_values($this->internalArray); 210 } 211 212 public function __unserialize(array $data) 213 { 214 $length = count($data); 215 $values = array_values($data); 216 for ($i = 0; $i < $length; ++$i) { 217 $this->internalArray[$i] = $values[$i]; 218 } 219 $this->size = $length; 220 } 189 221 }
Note: See TracChangeset
for help on using the changeset viewer.