-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
connection: Fix Phan issues and improve phpdocs in Client class (#37056)
* Declare the shape of returned response arrays for better static analysis. * Fix a bunch of other phpdocs to be more correct too. * Remove some unnecessary boolean checks, that were confusing Phan into marking all the keys in arrays as being possibly-missing (cf. phan/phan#4846) * At least they're unnecessary based on the declared return values of stuff and a quick look through the code. If we really need them, we should be more specific about what we're checking for and we should always return the documented WP_Error instead of passing the weird-falsey-value along. The most important fix here is getting the type of the `$body` parameter to `wpcom_json_api_request_as_blog` right, which fixes PhanTypeMismatchArgumentProbablyReal issues in a lot of callers. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/8821834019 Upstream-Ref: Automattic/jetpack@01d6d6d
- Loading branch information
Showing
8 changed files
with
101 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.