<commit_before><?php
declare(strict_types=1);
use Robo\Tasks;

/**
 * Provides tasks for the build system.
 */
class RoboFile extends Tasks {

  /**
   * Creates a new task runner.
   */
  function __construct() {
    $path = (string) getenv('PATH');
    $vendorDir = (string) realpath('vendor/bin');
    if (strpos($path, $vendorDir) === false) putenv("PATH=$vendorDir".PATH_SEPARATOR.$path);
  }

  /**
   * Deletes all generated files and reset any saved state.
   */
  function clean(): void {
    $this->_cleanDir('var');
    $this->_deleteDir(['build', 'doc/api', 'web']);
  }

  /**
   * Uploads the results of the code coverage.
   */
  function coverage(): void {
    $this->_exec('coveralls var/coverage.xml');
  }

  /**
   * Builds the documentation.
   */
  function doc(): void {
    $this->_exec('phpdoc');
    $this->_exec('mkdocs build');
  }

  /**
   * Performs the static analysis of source code.
   */
  function lint(): void {
    $this->_exec('phpstan analyse');
  }

  /**
   * Runs the test suites.
   */
  function test(): void {
    $this->taskPhpUnit()->run();
  }

  /**
   * Upgrades the project to the latest revision.
   */
  function upgrade(): void {
    $this->_exec('git reset --hard');
    $this->_exec('git fetch --all --prune');
    $this->_exec('git pull --rebase');
    $this->_exec('composer update --no-interaction');
  }
}
<commit_msg>Fixed the Composer task<commit_after><?php
declare(strict_types=1);
use Robo\Tasks;

/**
 * Provides tasks for the build system.
 */
class RoboFile extends Tasks {

  /**
   * Creates a new task runner.
   */
  function __construct() {
    $path = (string) getenv('PATH');
    $vendorDir = (string) realpath('vendor/bin');
    if (strpos($path, $vendorDir) === false) putenv("PATH=$vendorDir".PATH_SEPARATOR.$path);
  }

  /**
   * Deletes all generated files and reset any saved state.
   */
  function clean(): void {
    $this->_cleanDir('var');
    $this->_deleteDir(['build', 'doc/api', 'web']);
  }

  /**
   * Uploads the results of the code coverage.
   */
  function coverage(): void {
    $this->_exec('coveralls var/coverage.xml');
  }

  /**
   * Builds the documentation.
   */
  function doc(): void {
    $this->_exec('phpdoc');
    $this->_exec('mkdocs build');
  }

  /**
   * Performs the static analysis of source code.
   */
  function lint(): void {
    $this->_exec('phpstan analyse');
  }

  /**
   * Runs the test suites.
   */
  function test(): void {
    $this->taskPhpUnit()->run();
  }

  /**
   * Upgrades the project to the latest revision.
   */
  function upgrade(): void {
    $this->_exec('git reset --hard');
    $this->_exec('git fetch --all --prune');
    $this->_exec('git pull --rebase');
    $this->taskComposerUpdate(PHP_OS_FAMILY == 'Windows' ? 'C:\Program Files\PHP\share\composer.phar' : '/usr/local/bin/composer')->run();
  }
}

{'fraction_non_alphanumeric': 0.18471784086926044, 'fraction_numerical': 0.0007010164738871364, 'mean_word_length': 2.888283378746594, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1113984', 'n_tokens_mistral': 957, 'n_tokens_neox': 935, 'n_words': 229}