<commit_before><?php

namespace FileUpload;

use FileUpload\PathResolver\PathResolver;
use FileUpload\FileSystem\FileSystem;
use FileUpload\Validator\Validator;

class FileUploadFactory {
  /**
   * Validator to be used in the factory
   * @var Validator
   */
  protected $validator;
  
  /**
   * PathResolver to be used in the factory
   * @var PathResolver
   */
  protected $pathresolver;
  
  /**
   * FileSystem to be used in the factory
   * @var FileSystem
   */
  protected $filesystem;

  /**
   * Construct new factory with the given modules
   * @param Validator    $validator
   * @param PathResolver $pathresolver
   * @param FileSystem   $filesystem
   */
  public function __construct(Validator $validator, PathResolver $pathresolver, FileSystem $filesystem) {
    $this->validator    = $validator;
    $this->pathresolver = $pathresolver;
    $this->filesystem   = $filesystem;
  }

  /**
   * Create new instance of FileUpload with the preset modules
   * @param  array $upload
   * @param  array $server
   * @return FileUpload
   */
  public function create($upload, $server) {
    $fileupload = new FileUpload($upload, $server);
    $fileupload->setValidator($this->validator);
    $fileupload->setPathResolver($this->pathresolver);
    $fileupload->setFileSystem($this->filesystem);
    return $fileupload;
  }
}<commit_msg>Fixing method typo<commit_after><?php

namespace FileUpload;

use FileUpload\PathResolver\PathResolver;
use FileUpload\FileSystem\FileSystem;
use FileUpload\Validator\Validator;

class FileUploadFactory {
  /**
   * Validator to be used in the factory
   * @var Validator
   */
  protected $validator;
  
  /**
   * PathResolver to be used in the factory
   * @var PathResolver
   */
  protected $pathresolver;
  
  /**
   * FileSystem to be used in the factory
   * @var FileSystem
   */
  protected $filesystem;

  /**
   * Construct new factory with the given modules
   * @param Validator    $validator
   * @param PathResolver $pathresolver
   * @param FileSystem   $filesystem
   */
  public function __construct(Validator $validator, PathResolver $pathresolver, FileSystem $filesystem) {
    $this->validator    = $validator;
    $this->pathresolver = $pathresolver;
    $this->filesystem   = $filesystem;
  }

  /**
   * Create new instance of FileUpload with the preset modules
   * @param  array $upload
   * @param  array $server
   * @return FileUpload
   */
  public function create($upload, $server) {
    $fileupload = new FileUpload($upload, $server);
    $fileupload->addValidator($this->validator);
    $fileupload->setPathResolver($this->pathresolver);
    $fileupload->setFileSystem($this->filesystem);
    return $fileupload;
  }
}
{'fraction_non_alphanumeric': 0.10892923304927751, 'fraction_numerical': 0.0, 'mean_word_length': 3.5075125208681137, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '6702632', 'n_tokens_mistral': 795, 'n_tokens_neox': 803, 'n_words': 210}