<commit_before>import { PathUtils } from '../utils/path.utils';
import { Request } from 'express';
import { RequestMapper } from './requestmapper';

export class ExpressRequestMapper extends RequestMapper {

  constructor(request: Request) {
    super(request);
  }

  protected loadPathParams(request: Request): void {
    const params = request.params;

    if (!params) {
      return;
    }

    for (const key in params) {
      if (params.hasOwnProperty(key)) {
        this.pathParams[key] = params[key];
      }
    }
  }

  protected loadQueryParams(request: Request): void {
    const params = request.query;

    if (!params) {
      return;
    }

    for (const key in params) {
      if (params.hasOwnProperty(key)) {
        const paramValue: any = params[key];
        if (paramValue) {
          this[key] = PathUtils.getPathValue(paramValue);
        }
      }
    }
  }
  
}<commit_msg>fix(request): updated unused block<commit_after>import { PathUtils } from '../utils/path.utils';
import { Request } from 'express';
import { RequestMapper } from './requestmapper';

export class ExpressRequestMapper extends RequestMapper {

  constructor(request: Request) {
    super(request);
  }

  protected loadPathParams(request: Request): void {
    const params = request.params;

    for (const key in params) {
      if (params.hasOwnProperty(key)) {
        this.pathParams[key] = params[key];
      }
    }
  }

  protected loadQueryParams(request: Request): void {
    const params = request.query;

    for (const key in params) {
      if (params.hasOwnProperty(key)) {
        const paramValue: any = params[key];
        if (paramValue) {
          this[key] = PathUtils.getPathValue(paramValue);
        }
      }
    }
  }
  
}
{'fraction_non_alphanumeric': 0.12050256996002284, 'fraction_numerical': 0.0, 'mean_word_length': 2.711864406779661, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6597224', 'n_tokens_mistral': 517, 'n_tokens_neox': 507, 'n_words': 125}