WP-API/WP-API

View on GitHub

Showing 222 of 244 total issues

Avoid too many return statements within this method.
Open

        return rest_ensure_response( $response );
Severity: Major
Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return new WP_Error( 'rest_comment_failed_edit', __( 'Updating comment failed.' ), array( 'status' => 500 ) );
    Severity: Major
    Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return new WP_Error( 'rest_upload_sideload_error', $sideloaded['error'], array( 'status' => 500 ) );
      Severity: Major
      Found in lib/endpoints/class-wp-rest-attachments-controller.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return new WP_Error( 'rest_comment_trash_post', __( 'Sorry, you cannot create a comment on this post.' ), array( 'status' => 403 ) );
        Severity: Major
        Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return new WP_Error( 'rest_comment_failed_create', __( 'Creating comment failed.' ), array( 'status' => 500 ) );
          Severity: Major
          Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return true;
            Severity: Major
            Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return $response;
              Severity: Major
              Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return current_user_can( 'edit_comment', $comment->comment_ID );
                Severity: Major
                Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return $meta_update;
                  Severity: Major
                  Found in lib/endpoints/class-wp-rest-users-controller.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return new WP_Error( $error_code, $error_message, array( 'status' => 409 ) );
                    Severity: Major
                    Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return new WP_Error( $error_code, $error_message, array( 'status' => 400 ) );
                      Severity: Major
                      Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return $fields_update;
                        Severity: Major
                        Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return $fields_update;
                          Severity: Major
                          Found in lib/endpoints/class-wp-rest-terms-controller.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                            return new WP_Error( 'rest_comment_closed', __( 'Sorry, comments are closed on this post.' ), array( 'status' => 403 ) );
                            Severity: Major
                            Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                      return $response;
                              Severity: Major
                              Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                        return true;
                                Severity: Major
                                Found in lib/endpoints/class-wp-rest-users-controller.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                  return $user_id;
                                  Severity: Major
                                  Found in lib/endpoints/class-wp-rest-users-controller.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return $response;
                                    Severity: Major
                                    Found in lib/endpoints/class-wp-rest-terms-controller.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              return $sideloaded;
                                      Severity: Major
                                      Found in lib/endpoints/class-wp-rest-attachments-controller.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                        return new WP_Error( 'rest_comment_draft_post', __( 'Sorry, you cannot create a comment on this post.' ), array( 'status' => 403 ) );
                                        Severity: Major
                                        Found in lib/endpoints/class-wp-rest-comments-controller.php - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language