WP-API/WP-API

View on GitHub

Showing 244 of 244 total issues

Avoid too many return statements within this method.
Open

            return new WP_Error( 'rest_comment_invalid_post_id', __( 'Sorry, you cannot create this comment without a post.' ), 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 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 new WP_Error( 'rest_comment_author_email_required', __( 'Creating a comment requires a valid author email.' ), 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 new WP_Error( 'rest_invalid_param', sprintf( /* translators: 1: parameter, 2: type name */ __( '%1$s is not of type %2$s.' ), $param, 'string' ) );
        Severity: Major
        Found in plugin.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-posts-controller.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return $value;
            Severity: Major
            Found in plugin.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-posts-controller.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return new WP_Error( 'rest_post_invalid_id', __( 'Invalid post parent id.' ), array( 'status' => 400 ) );
                Severity: Major
                Found in lib/endpoints/class-wp-rest-posts-controller.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return new WP_Error( 'rest_invalid_field', __( 'A password protected post can not be set to sticky.' ), array( 'status' => 400 ) );
                  Severity: Major
                  Found in lib/endpoints/class-wp-rest-posts-controller.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                            return new WP_Error( 'rest_invalid_param', sprintf( __( '%s is not a valid IP address.' ), $value ) );
                    Severity: Major
                    Found in plugin.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                              return new WP_Error( 'rest_invalid_param', sprintf( /* translators: 1: parameter, 2: minimum number, 3: maximum number */ __( '%1$s must be between %2$d (exclusive) and %3$d (exclusive)' ), $param, $args['minimum'], $args['maximum'] ) );
                      Severity: Major
                      Found in plugin.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                                return new WP_Error( 'rest_invalid_email', __( 'The email address you provided is invalid.' ) );
                        Severity: Major
                        Found in plugin.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                              return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be less than %2$d (inclusive)' ), $param, $args['maximum'] ) );
                          Severity: Major
                          Found in plugin.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                    return new WP_Error( 'rest_invalid_param', sprintf( /* translators: 1: parameter, 2: minimum number, 3: maximum number */ __( '%1$s must be between %2$d (exclusive) and %3$d (inclusive)' ), $param, $args['minimum'], $args['maximum'] ) );
                            Severity: Major
                            Found in plugin.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                          return new WP_Error( 'rest_cannot_delete', __( 'The post cannot be deleted.' ), array( 'status' => 500 ) );
                              Severity: Major
                              Found in lib/endpoints/class-wp-rest-posts-controller.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                        return false;
                                Severity: Major
                                Found in lib/endpoints/class-wp-rest-posts-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-posts-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-posts-controller.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              return apply_filters( "rest_pre_insert_{$this->post_type}", $prepared_post, $request );
                                      Severity: Major
                                      Found in lib/endpoints/class-wp-rest-posts-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-posts-controller.php - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language