Make WordPress Core


Ignore:
Timestamp:
11/11/2019 02:41:15 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: In various @return tags, list the expected type first, instead of WP_Error.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

    r46586 r46696  
    119119     *
    120120     * @param WP_REST_Request $request Full details about the request.
    121      * @return WP_Error|bool True if the request has read access, error object otherwise.
     121     * @return true|WP_Error True if the request has read access, error object otherwise.
    122122     */
    123123    public function get_items_permissions_check( $request ) {
     
    176176     *
    177177     * @param WP_REST_Request $request Full details about the request.
    178      * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     178     * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    179179     */
    180180    public function get_items( $request ) {
     
    350350     *
    351351     * @param WP_REST_Request $request Full details about the request.
    352      * @return WP_Error|bool True if the request has read access for the item, error object otherwise.
     352     * @return true|WP_Error True if the request has read access for the item, error object otherwise.
    353353     */
    354354    public function get_item_permissions_check( $request ) {
     
    381381     *
    382382     * @param WP_REST_Request $request Full details about the request.
    383      * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     383     * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    384384     */
    385385    public function get_item( $request ) {
     
    401401     *
    402402     * @param WP_REST_Request $request Full details about the request.
    403      * @return WP_Error|bool True if the request has access to create items, error object otherwise.
     403     * @return true|WP_Error True if the request has access to create items, error object otherwise.
    404404     */
    405405    public function create_item_permissions_check( $request ) {
     
    491491     *
    492492     * @param WP_REST_Request $request Full details about the request.
    493      * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     493     * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    494494     */
    495495    public function create_item( $request ) {
     
    668668     *
    669669     * @param WP_REST_Request $request Full details about the request.
    670      * @return WP_Error|bool True if the request has access to update the item, error object otherwise.
     670     * @return true|WP_Error True if the request has access to update the item, error object otherwise.
    671671     */
    672672    public function update_item_permissions_check( $request ) {
     
    689689     *
    690690     * @param WP_REST_Request $request Full details about the request.
    691      * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     691     * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    692692     */
    693693    public function update_item( $request ) {
     
    788788     *
    789789     * @param WP_REST_Request $request Full details about the request.
    790      * @return WP_Error|bool True if the request has access to delete the item, error object otherwise.
     790     * @return true|WP_Error True if the request has access to delete the item, error object otherwise.
    791791     */
    792792    public function delete_item_permissions_check( $request ) {
     
    808808     *
    809809     * @param WP_REST_Request $request Full details about the request.
    810      * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     810     * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    811811     */
    812812    public function delete_item( $request ) {
     
    16921692     * @param WP_REST_Request $request Full details about the request.
    16931693     * @param string          $param   The parameter name.
    1694      * @return WP_Error|string The sanitized email address, if valid,
     1694     * @return string|WP_Error The sanitized email address, if valid,
    16951695     *                         otherwise an error.
    16961696     */
Note: See TracChangeset for help on using the changeset viewer.