<commit_before><?php

/**
 * This file is part of Gush package.
 *
 * (c) 2013-2014 <NAME> <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Gush\Helper;

use Gush\Application;
use Gush\Template\Meta\Header\GPL3Template;
use Gush\Template\Meta\Header\MITTemplate;
use Gush\Template\Meta\Header\NoLicenseTemplate;
use Gush\Template\Pats\PatTemplate;
use Gush\Template\PullRequest\Create\DefaultTemplate;
use Gush\Template\PullRequest\Create\EnterpriseTemplate;
use Gush\Template\PullRequest\Create\PullRequestCustomTemplate;
use Gush\Template\PullRequest\Create\SymfonyDocTemplate;
use Gush\Template\PullRequest\Create\SymfonyTemplate;
use Gush\Template\PullRequest\Create\ZendFrameworkDocTemplate;
use Gush\Template\PullRequest\Create\ZendFrameworkTemplate;
use Gush\Template\TemplateInterface;
use Symfony\Component\Console\Helper\HelperInterface;
use Symfony\Component\Console\Input\InputAwareInterface;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Helper\Helper;

class TemplateHelper extends Helper implements InputAwareInterface
{
    protected $templates;
    /** @var \Symfony\Component\Console\Helper\DialogHelper  */
    protected $dialog;
    protected $input;

    public function __construct(HelperInterface $dialog, Application $application)
    {
        $this->registerTemplate(new SymfonyTemplate());
        $this->registerTemplate(new SymfonyDocTemplate());
        $this->registerTemplate(new EnterpriseTemplate());
        $this->registerTemplate(new PullRequestCustomTemplate($application));
        $this->registerTemplate(new PatTemplate());
        $this->registerTemplate(new DefaultTemplate());
        $this->registerTemplate(new ZendFrameworkDocTemplate());
        $this->registerTemplate(new ZendFrameworkTemplate());
        $this->registerTemplate(new MITTemplate());
        $this->registerTemplate(new GPL3Template());
        $this->registerTemplate(new NoLicenseTemplate());
        $this->dialog = $dialog;
    }

    /**
     * {@inheritDoc}
     */
    public function setInput(InputInterface $input)
    {
        $this->input = $input;
    }

    /**
     * Registers a template
     *
     * @param \Gush\Template\TemplateInterface $template
     *
     * @throws \InvalidArgumentException
     */<commit_msg>typehinting implementations if there are no real extension points<commit_after><?php

/**
 * This file is part of Gush package.
 *
 * (c) 2013-2014 <NAME> <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Gush\Helper;

use Gush\Application;
use Gush\Template\Meta\Header\GPL3Template;
use Gush\Template\Meta\Header\MITTemplate;
use Gush\Template\Meta\Header\NoLicenseTemplate;
use Gush\Template\Pats\PatTemplate;
use Gush\Template\PullRequest\Create\DefaultTemplate;
use Gush\Template\PullRequest\Create\EnterpriseTemplate;
use Gush\Template\PullRequest\Create\PullRequestCustomTemplate;
use Gush\Template\PullRequest\Create\SymfonyDocTemplate;
use Gush\Template\PullRequest\Create\SymfonyTemplate;
use Gush\Template\PullRequest\Create\ZendFrameworkDocTemplate;
use Gush\Template\PullRequest\Create\ZendFrameworkTemplate;
use Gush\Template\TemplateInterface;
use Symfony\Component\Console\Helper\DialogHelper;
use Symfony\Component\Console\Input\InputAwareInterface;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Helper\Helper;

class TemplateHelper extends Helper implements InputAwareInterface
{
    protected $templates;
    /** @var \Symfony\Component\Console\Helper\DialogHelper  */
    protected $dialog;
    protected $input;

    public function __construct(DialogHelper $dialog, Application $application)
    {
        $this->registerTemplate(new SymfonyTemplate());
        $this->registerTemplate(new SymfonyDocTemplate());
        $this->registerTemplate(new EnterpriseTemplate());
        $this->registerTemplate(new PullRequestCustomTemplate($application));
        $this->registerTemplate(new PatTemplate());
        $this->registerTemplate(new DefaultTemplate());
        $this->registerTemplate(new ZendFrameworkDocTemplate());
        $this->registerTemplate(new ZendFrameworkTemplate());
        $this->registerTemplate(new MITTemplate());
        $this->registerTemplate(new GPL3Template());
        $this->registerTemplate(new NoLicenseTemplate());
        $this->dialog = $dialog;
    }

    /**
     * {@inheritDoc}
     */
    public function setInput(InputInterface $input)
    {
        $this->input = $input;
    }

    /**
     * Registers a template
     *
     * @param \Gush\Template\TemplateInterface $template
     *
     * @throws \InvalidArgumentException
     */
{'fraction_non_alphanumeric': 0.109979633401222, 'fraction_numerical': 0.004073319755600814, 'mean_word_length': 4.263665594855305, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 35, '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': '494252', 'n_tokens_mistral': 1358, 'n_tokens_neox': 1312, 'n_words': 266}