WP-API/WP-API

View on GitHub

Showing 244 of 244 total issues

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 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 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( '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 $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 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

              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_cannot_read_post', __( 'Sorry, you cannot read the post for this comment.' ), array( 'status' => rest_authorization_required_code() ) );
                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 $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-comments-controller.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return $check_permission;
                      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-users-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 $response;
                            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 $fields_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 $meta_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-comments-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 $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 rest_ensure_response( $response );
                                        Severity: Major
                                        Found in lib/endpoints/class-wp-rest-terms-controller.php - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language