<commit_before><?php
/**
 * Copyright 2017 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file LICENSE for license information (LGPL). If you
 * did not receive this file, see http://www.horde.org/licenses/lgpl.
 *
 * @author   <NAME> <<EMAIL>>
 * @category Horde
 * @license  https://www.horde.org/licenses/bsd BSD
 * @package  GitTools
 */

namespace Horde\GitTools\Module;

use Horde\GitTools\Action;
use Horde_Argv_Option;
use Horde_Http_Client;

/**
 * Class for handling 'component' actions.
 *
 * @author    <NAME> <<EMAIL>>
 * @category  Horde
 * @copyright 2017 Horde LLC
 * @license   https://www.horde.org/licenses/bsd BSD
 * @package   GitTools
 */
class Components extends Base
{

    /**
     * Handles the module's actions.
     *
     * @param  array $arguments  Argv arguments
     * @param  array $params    Configuration parameters.
     */
    public function handle(\Components_Configs $config)
    {
        \Horde\GitTools\Components::main();
        return true;<commit_msg>Only pass to Components if we asked it to.<commit_after><?php
/**
 * Copyright 2017 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file LICENSE for license information (LGPL). If you
 * did not receive this file, see http://www.horde.org/licenses/lgpl.
 *
 * @author   <NAME> <<EMAIL>>
 * @category Horde
 * @license  https://www.horde.org/licenses/bsd BSD
 * @package  GitTools
 */

namespace Horde\GitTools\Module;

use Horde\GitTools\Action;
use Horde_Argv_Option;
use Horde_Http_Client;

/**
 * Class for handling 'component' actions.
 *
 * @author    <NAME> <<EMAIL>>
 * @category  Horde
 * @copyright 2017 Horde LLC
 * @license   https://www.horde.org/licenses/bsd BSD
 * @package   GitTools
 */
class Components extends Base
{

    /**
     * Handles the module's actions.
     *
     * @param  array $arguments  Argv arguments
     * @param  array $params    Configuration parameters.
     */
    public function handle(\Components_Configs $config)
    {
        $arguments = $config->getArguments();
        if (empty($arguments) ||
           (!empty($arguments[0]) && $arguments[0] != 'components')) {
            return false;
        }
        \Horde\GitTools\Components::main();
        return true;
{'fraction_non_alphanumeric': 0.13088301210219633, 'fraction_numerical': 0.008068130883012102, 'mean_word_length': 2.922671353251318, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 16, 'https://': 4, 'lorem ipsum': 0, 'www.': 8, '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': '1649932', 'n_tokens_mistral': 716, 'n_tokens_neox': 684, 'n_words': 188}