Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions functionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<int, WP_Block>'],
'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)"],
Expand Down
8 changes: 4 additions & 4 deletions wordpress-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand Down