Skip to content

Commit

Permalink
phan: Update wpcom stubs (#37167)
Browse files Browse the repository at this point in the history
* phan: Update wpcom stubs
* Remove no-longer-needed `@phan-suppress`

---------

Co-authored-by: Phabricator Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>
  • Loading branch information
3 people authored May 1, 2024
1 parent 8b9fb84 commit 8a1f680
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .phan/stubs/wpcom-stubs.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Stubs automatically generated from WordPress.com commit bfb2ad18f8fd904ad916be5877a31c975ae02df2.
* Stubs automatically generated from WordPress.com commit 633607ea914b8ce7062bc35082c83ab247ec196c.
*
* Do not edit this directly! Update the definition file in the wpcom repo at
* `bin/teamcity-builds/jetpack-stubs/stub-defs.php` and regenerate the stubs
Expand Down Expand Up @@ -116,7 +116,7 @@ public static function get_current_plan($blog_id = 0)
class WPCOM_Store
{
/**
* @deprecated
* @deprecated
* @param int $user_id
* @param int $blog_id
* @param false $ids_only
Expand Down Expand Up @@ -877,7 +877,7 @@ function wpcom_should_load_theme_files_on_rest_api()
{
}
/**
* @deprecated
* @deprecated
* @return bool
*/
function wpcom_is_jetpack_search_supported($blog_id)
Expand Down Expand Up @@ -1255,6 +1255,15 @@ function get_lang_id_by_code($lang_code)
{
}
}
namespace A8C\Billingdaddy\Users {
/**
* @param int $user_id
* @return \WP_User|false
*/
function get_wpcom_user($user_id)
{
}
}
namespace A8C\BloggingPrompts {
class Answers
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: removed
Comment: Remove no-longer-needed `@phan-suppress`. No change to functionality.


Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function current_user_has_wpcom_account() {

if ( function_exists( '\A8C\Billingdaddy\Users\get_wpcom_user' ) ) {
// On Simple sites, use get_wpcom_user function to check if the user has a WordPress.com account.
// @phan-suppress-next-line PhanUndeclaredFunction
$user = \A8C\Billingdaddy\Users\get_wpcom_user( $user_id );
$has_account = isset( $user->ID );
} else {
Expand Down

0 comments on commit 8a1f680

Please sign in to comment.