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
2 changes: 1 addition & 1 deletion finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
//->notPath('wp-includes/theme-compat/footer.php')
//->notPath('wp-includes/theme-compat/header.php')
//->notPath('wp-includes/theme-compat/sidebar.php')
// ->notPath('wp-includes/Requests/src')
// ->notPath('wp-includes/Requests/src')
->sortByName()
;
6 changes: 5 additions & 1 deletion functionMap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?php

$httpReturnType = 'array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error';
$httpReturnType = 'array{headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error';

if (file_exists(__DIR__ . '/source/wordpress/wp-includes/Requests/Cookie/Jar.php')) {
$httpReturnType = 'array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array<int, \WP_HTTP_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error';
}
$cronArgsType = 'list<mixed>';
$wpWidgetRssFormArgsType = 'array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int}';
$wpWidgetRssFormInputType = 'array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool}';
Expand Down
93 changes: 0 additions & 93 deletions functionMap62.php

This file was deleted.

36 changes: 11 additions & 25 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,17 @@ if [ ! -d vendor ]; then
composer update
fi

if [ -r source/wordpress/wp-includes/Requests/Cookie/Jar.php ]; then
# Exclude globals.
"$(dirname "$0")/vendor/bin/generate-stubs" \
--force \
--finder=finder.php \
--visitor=visitor.php \
--header="$HEADER" \
--functions \
--classes \
--interfaces \
--traits \
--out="$FILE"
else
# Exclude globals.
"$(dirname "$0")/vendor/bin/generate-stubs" \
--force \
--finder=finder.php \
--visitor=visitor62.php \
--header="$HEADER" \
--functions \
--classes \
--interfaces \
--traits \
--out="$FILE"
fi
# Exclude globals.
"$(dirname "$0")/vendor/bin/generate-stubs" \
--force \
--finder=finder.php \
--visitor=visitor.php \
--header="$HEADER" \
--functions \
--classes \
--interfaces \
--traits \
--out="$FILE"

# Use literal-string type for wpdb::prepare() query statement parameter.
sed -i -e 's#^.*@param string \+\$query \+Query statement.*$#&\n * @phpstan-param literal-string $query#' "$FILE"
Expand Down
Loading