WP-API/WP-API

View on GitHub

Showing 222 of 244 total issues

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-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( /* 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 sanitize_text_field( $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 (inclusive) 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 true;
            Severity: Major
            Found in plugin.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 new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be less than %2$d (exclusive)' ), $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( __( '%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_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 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_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 new WP_Error( 'rest_invalid_date', __( 'The date 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 $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 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 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 sanitize_text_field( $value );
                                  Severity: Major
                                  Found in plugin.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                        return esc_url_raw( $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_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 greater than %2$d (exclusive)' ), $param, $args['minimum'] ) );
                                        Severity: Major
                                        Found in plugin.php - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language