@@ -30531,6 +30531,7 @@ public function __construct(array $settings = array())
3053130531 * Class representing a list of block instances.
3053230532 *
3053330533 * @since 5.5.0
30534+ * @phpstan-implements ArrayAccess<int, WP_Block>
3053430535 */
3053530536 #[\AllowDynamicProperties]
3053630537 class WP_Block_List implements \Iterator, \ArrayAccess, \Countable
@@ -30583,6 +30584,8 @@ public function __construct($blocks, $available_context = array(), $registry = \
3058330584 *
3058430585 * @param string $index Index of block to check.
3058530586 * @return bool Whether block exists.
30587+ * @phpstan-param int $offset
30588+ * @phpstan-return bool
3058630589 */
3058730590 #[\ReturnTypeWillChange]
3058830591 public function offsetExists($index)
@@ -30597,6 +30600,8 @@ public function offsetExists($index)
3059730600 *
3059830601 * @param string $index Index of block value to retrieve.
3059930602 * @return mixed|null Block value if exists, or null.
30603+ * @phpstan-param int $offset
30604+ * @phpstan-return WP_Block|null
3060030605 */
3060130606 #[\ReturnTypeWillChange]
3060230607 public function offsetGet($index)
@@ -30611,6 +30616,8 @@ public function offsetGet($index)
3061130616 *
3061230617 * @param string $index Index of block value to set.
3061330618 * @param mixed $value Block value.
30619+ * @phpstan-param int|null $offset
30620+ * @phpstan-return void
3061430621 */
3061530622 #[\ReturnTypeWillChange]
3061630623 public function offsetSet($index, $value)
@@ -30624,6 +30631,8 @@ public function offsetSet($index, $value)
3062430631 * @link https://www.php.net/manual/en/arrayaccess.offsetunset.php
3062530632 *
3062630633 * @param string $index Index of block value to unset.
30634+ * @phpstan-param int $offset
30635+ * @phpstan-return void
3062730636 */
3062830637 #[\ReturnTypeWillChange]
3062930638 public function offsetUnset($index)
@@ -51695,6 +51704,7 @@ public function set_spacing_sizes()
5169551704 * @package WordPress
5169651705 * @subpackage Theme
5169751706 * @since 3.4.0
51707+ * @phpstan-type ThemeKey 'Name'|'Version'|'Status'|'Title'|'Author'|'Author Name'|'Author URI'|'Description'|'Template'|'Stylesheet'|'Template Files'|'Stylesheet Files'|'Template Dir'|'Stylesheet Dir'|'Screenshot'|'Tags'|'Theme Root'|'Theme Root URI'|'Parent Theme'
5169851708 */
5169951709 #[\AllowDynamicProperties]
5170051710 final class WP_Theme implements \ArrayAccess
@@ -51784,6 +51794,7 @@ public function offsetUnset($offset)
5178451794 *
5178551795 * @param mixed $offset
5178651796 * @return bool
51797+ * @phpstan-return ($offset is ThemeKey ? true : false)
5178751798 */
5178851799 #[\ReturnTypeWillChange]
5178951800 public function offsetExists($offset)
@@ -51803,6 +51814,7 @@ public function offsetExists($offset)
5180351814 *
5180451815 * @param mixed $offset
5180551816 * @return mixed
51817+ * @phpstan-return ($offset is ThemeKey ? mixed : null)
5180651818 */
5180751819 #[\ReturnTypeWillChange]
5180851820 public function offsetGet($offset)
@@ -62768,6 +62780,8 @@ public function merge_with(&$other)
6276862780 * @since 4.4.0
6276962781 *
6277062782 * @link https://www.php.net/manual/en/class.arrayaccess.php
62783+ * @phpstan-template T of array
62784+ * @phpstan-implements ArrayAccess<key-of<T>, value-of<T>>
6277162785 */
6277262786 #[\AllowDynamicProperties]
6277362787 class WP_REST_Request implements \ArrayAccess
@@ -63301,6 +63315,8 @@ public function has_valid_params()
6330163315 *
6330263316 * @param string $offset Parameter name.
6330363317 * @return bool Whether the parameter is set.
63318+ * @phpstan-param @param key-of<T> $offset
63319+ * @phpstan-return bool
6330463320 */
6330563321 #[\ReturnTypeWillChange]
6330663322 public function offsetExists($offset)
@@ -63313,6 +63329,9 @@ public function offsetExists($offset)
6331363329 *
6331463330 * @param string $offset Parameter name.
6331563331 * @return mixed|null Value if set, null otherwise.
63332+ * @phpstan-template TOffset of key-of<T>
63333+ * @phpstan-param TOffset $offset
63334+ * @phpstan-return T[TOffset]
6331663335 */
6331763336 #[\ReturnTypeWillChange]
6331863337 public function offsetGet($offset)
@@ -63325,6 +63344,10 @@ public function offsetGet($offset)
6332563344 *
6332663345 * @param string $offset Parameter name.
6332763346 * @param mixed $value Parameter value.
63347+ * @phpstan-template TOffset of key-of<T>
63348+ * @phpstan-param TOffset $offset
63349+ * @phpstan-param T[TOffset] $value
63350+ * @phpstan-return void
6332863351 */
6332963352 #[\ReturnTypeWillChange]
6333063353 public function offsetSet($offset, $value)
@@ -63336,6 +63359,9 @@ public function offsetSet($offset, $value)
6333663359 * @since 4.4.0
6333763360 *
6333863361 * @param string $offset Parameter name.
63362+ * @phpstan-template TOffset of key-of<T>
63363+ * @phpstan-param TOffset $offset
63364+ * @phpstan-return void
6333963365 */
6334063366 #[\ReturnTypeWillChange]
6334163367 public function offsetUnset($offset)
@@ -111566,6 +111592,8 @@ function wp_doing_cron()
111566111592 *
111567111593 * @param mixed $thing The variable to check.
111568111594 * @return bool Whether the variable is an instance of WP_Error.
111595+ * @phpstan-assert-if-true \WP_Error $thing
111596+ * @phpstan-return bool
111569111597 */
111570111598 function is_wp_error($thing)
111571111599 {
0 commit comments