diff --git a/functionMap.php b/functionMap.php index b73efa53..7468df9b 100644 --- a/functionMap.php +++ b/functionMap.php @@ -71,10 +71,10 @@ 'WP_Theme::offsetExists' => ['($offset is ThemeKey ? true : false)'], 'WP_Theme::offsetGet' => ['($offset is ThemeKey ? mixed : null)'], 'WP_Block_List' => [null, '@phpstan-implements'=>'ArrayAccess'], - 'WP_Block_List::offsetExists' => [null, 'index'=>'int'], - 'WP_Block_List::offsetGet' => ['WP_Block|null', 'index'=>'int'], - 'WP_Block_List::offsetSet' => ['void', 'index'=>'int|null'], - 'WP_Block_List::offsetUnset' => ['void', 'index'=>'int'], + 'WP_Block_List::offsetExists' => [null, 'offset'=>'int'], + 'WP_Block_List::offsetGet' => ['WP_Block|null', 'offset'=>'int'], + 'WP_Block_List::offsetSet' => ['void', 'offset'=>'int|null'], + 'WP_Block_List::offsetUnset' => ['void', 'offset'=>'int'], 'is_wp_error' => ['($thing is \WP_Error ? true : false)', '@phpstan-assert-if-true'=>'\WP_Error $thing'], 'current_time' => ["(\$type is 'timestamp'|'U' ? int : string)"], 'mysql2date' => ["(\$format is 'G'|'U' ? int|false : string|false)"], diff --git a/wordpress-stubs.php b/wordpress-stubs.php index 95461dc0..144f22c9 100644 --- a/wordpress-stubs.php +++ b/wordpress-stubs.php @@ -30917,7 +30917,7 @@ public function __construct($blocks, $available_context = array(), $registry = \ * * @param string $offset Offset of block to check for. * @return bool Whether block exists. - * @phpstan-param int $index + * @phpstan-param int $offset */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -30932,7 +30932,7 @@ public function offsetExists($offset) * * @param string $offset Offset of block value to retrieve. * @return mixed|null Block value if exists, or null. - * @phpstan-param int $index + * @phpstan-param int $offset * @phpstan-return WP_Block|null */ #[\ReturnTypeWillChange] @@ -30948,7 +30948,7 @@ public function offsetGet($offset) * * @param string $offset Offset of block value to set. * @param mixed $value Block value. - * @phpstan-param int|null $index + * @phpstan-param int|null $offset * @phpstan-return void */ #[\ReturnTypeWillChange] @@ -30963,7 +30963,7 @@ public function offsetSet($offset, $value) * @link https://www.php.net/manual/en/arrayaccess.offsetunset.php * * @param string $offset Offset of block value to unset. - * @phpstan-param int $index + * @phpstan-param int $offset * @phpstan-return void */ #[\ReturnTypeWillChange]