Skip to content
Draft
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
2 changes: 1 addition & 1 deletion src/Visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ private static function getTypeNameFromString(string $tagVariable): ?string
{
// PHPStan doesn't support typed array shapes (`int[]{...}`) so replace
// typed arrays such as `int[]` with `array`.
$tagVariableType = preg_replace('#[a-zA-Z0-9_]+\[\]#', 'array', $tagVariable);
$tagVariableType = preg_replace('#[a-zA-Z0-9_]+(?:\[\])+#', 'array', $tagVariable);

if ($tagVariableType === null) {
return null;
Expand Down
4 changes: 2 additions & 2 deletions wordpress-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -66299,7 +66299,7 @@ public function __construct()
* @param array[][] $fonts Optional. The font-families and their font variations.
* See {@see wp_print_font_faces()} for the supported fields.
* Default empty array.
* @phpstan-param array[]<int|string, array{
* @phpstan-param array<int|string, array{
* ?: array<array-key, array{
* font-family: string,
* src: string|string[],
Expand Down Expand Up @@ -113386,7 +113386,7 @@ function fetch_feed($url)
* }
* }
* }
* @phpstan-param array[]<int|string, array{
* @phpstan-param array<int|string, array{
* ?: array<array-key, array{
* font-family: string,
* src: string|string[],
Expand Down