Changeset 51532
- Timestamp:
- 08/03/2021 11:11:45 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-list.php
r48845 r51532 73 73 * @return bool Whether block exists. 74 74 */ 75 #[ReturnTypeWillChange] 75 76 public function offsetExists( $index ) { 76 77 return isset( $this->blocks[ $index ] ); … … 87 88 * @return mixed|null Block value if exists, or null. 88 89 */ 90 #[ReturnTypeWillChange] 89 91 public function offsetGet( $index ) { 90 92 $block = $this->blocks[ $index ]; … … 108 110 * @param mixed $value Block value. 109 111 */ 112 #[ReturnTypeWillChange] 110 113 public function offsetSet( $index, $value ) { 111 114 if ( is_null( $index ) ) { … … 125 128 * @param string $index Index of block value to unset. 126 129 */ 130 #[ReturnTypeWillChange] 127 131 public function offsetUnset( $index ) { 128 132 unset( $this->blocks[ $index ] ); … … 136 140 * @link https://www.php.net/manual/en/iterator.rewind.php 137 141 */ 142 #[ReturnTypeWillChange] 138 143 public function rewind() { 139 144 reset( $this->blocks ); … … 149 154 * @return mixed Current element. 150 155 */ 156 #[ReturnTypeWillChange] 151 157 public function current() { 152 158 return $this->offsetGet( $this->key() ); … … 162 168 * @return mixed Key of the current element. 163 169 */ 170 #[ReturnTypeWillChange] 164 171 public function key() { 165 172 return key( $this->blocks ); … … 173 180 * @link https://www.php.net/manual/en/iterator.next.php 174 181 */ 182 #[ReturnTypeWillChange] 175 183 public function next() { 176 184 next( $this->blocks ); … … 184 192 * @link https://www.php.net/manual/en/iterator.valid.php 185 193 */ 194 #[ReturnTypeWillChange] 186 195 public function valid() { 187 196 return null !== key( $this->blocks ); … … 197 206 * @return int Block count. 198 207 */ 208 #[ReturnTypeWillChange] 199 209 public function count() { 200 210 return count( $this->blocks );
Note: See TracChangeset
for help on using the changeset viewer.