<commit_before><?php
namespace Drupal\AppConsole\Console;

use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Debug\Debug;

class Application extends BaseApplication
{
  private $commandsRegistered = false;

  private $autoload = false;

  protected $booted = false;

  protected $config;

  protected $directoryRoot;

  /**
   * Create a new application extended from \Symfony\Component\Console\Application
   */
  public function __construct($config)
  {
    $this->config = $config;

    parent::__construct(
      'Drupal Console',
      sprintf('%s (%s)', $version, $environment)
    );

    $this->getDefinition()->addOption(
      new InputOption(
        '--bootstrap-file',
        '-b',
        InputOption::VALUE_OPTIONAL,
        'Path to Drupal bootstrap file (core/includes/boostrap.inc).'
      )<commit_msg>Extract and use values form configuration<commit_after><?php
namespace Drupal\AppConsole\Console;

use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Debug\Debug;

class Application extends BaseApplication
{
  private $commandsRegistered = false;

  private $autoload = false;

  protected $booted = false;

  protected $config;

  protected $directoryRoot;

  /**
   * Create a new application extended from \Symfony\Component\Console\Application
   */
  public function __construct($config)
  {
    $this->config = $config;

    $environment = $config['application']['environment'];
    $version = $config['application']['version'];

    parent::__construct(
      'Drupal Console',
      sprintf('%s (%s)', $version, $environment)
    );

    $this->getDefinition()->addOption(
      new InputOption(
        '--bootstrap-file',
        '-b',
        InputOption::VALUE_OPTIONAL,
        'Path to Drupal bootstrap file (core/includes/boostrap.inc).'
      )
{'fraction_non_alphanumeric': 0.11857341361741547, 'fraction_numerical': 0.0, 'mean_word_length': 3.8322147651006713, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '7560138', 'n_tokens_mistral': 601, 'n_tokens_neox': 593, 'n_words': 135}