<commit_before><?php

namespace Console;

class Runner
{

    protected $appName = 'Console Application';
    protected $appVersion = '1.0';
    protected $self;
    protected $commands = [];
    protected $argv; // original argv array

    public function __construct(array $argv = [])
    {

        if (empty($argv)) {
            $this->argv = $GLOBALS['argv'];
        } else {
            $this->argv = $argv;
        }

        $this->self = (isset($argv[0]) ? $this->argv[0] : '<filename>');

    }

    public function register($name, CommandInterface $command)
    {

        if (!isset($this->commands[$name])) {
            $this->commands[$name] = $command;
        } else {
            throw new Exception\CommandAlreadyRegisteredException();
        }

        return $this;

    }

    public function registerAll(array $commands)
    {

        foreach($commands as $name => $command) {
            $this->register($name, $command);
        }

        return $this;

    }
<commit_msg>Argv fix<commit_after><?php

namespace Console;

class Runner
{

    protected $appName = 'Console Application';
    protected $appVersion = '1.0';
    protected $self;
    protected $commands = [];
    protected $argv; // original argv array

    public function __construct(array $argv = [])
    {

        if (empty($argv)) {
            $this->argv = $GLOBALS['argv'];
        } else {
            $this->argv = $argv;
        }

        $this->self = (isset($this->argv[0]) ? $this->argv[0] : '<filename>');

    }

    public function register($name, CommandInterface $command)
    {

        if (!isset($this->commands[$name])) {
            $this->commands[$name] = $command;
        } else {
            throw new Exception\CommandAlreadyRegisteredException();
        }

        return $this;

    }

    public function registerAll(array $commands)
    {

        foreach($commands as $name => $command) {
            $this->register($name, $command);
        }

        return $this;

    }

{'fraction_non_alphanumeric': 0.14763092269326683, 'fraction_numerical': 0.00399002493765586, 'mean_word_length': 2.0814132104454686, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 22, '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': '3912339', 'n_tokens_mistral': 585, 'n_tokens_neox': 558, 'n_words': 127}