<commit_before><?php

namespace PHPFastCGI\FastCGIDaemon;

use PHPFastCGI\FastCGIDaemon\Command\DaemonRunCommand;
use Symfony\Component\Console\Application;
/**
 * The default implementation of the ApplicationFactoryInterface.
 */
class ApplicationFactory implements ApplicationFactoryInterface
{
    /**
     * @var DaemonFactoryInterface
     */
    protected $daemonFactory;

    /**
     * Constructor.
     * 
     * @param DaemonFactoryInterface $daemonFactory The factory to use to create daemons
     */
    public function __construct(DaemonFactoryInterface $daemonFactory = null)
    {
        if (null === $daemonFactory) {
            $this->daemonFactory = new DaemonFactory;
        } else {
            $this->daemonFactory = $daemonFactory;
        }
    }

    /**
     * {@inheritdoc}
     */
    public function createApplication($kernel, $commandName = 'run', $commandDescription = 'Run a FastCGI daemon')
    {
        $command = $this->createCommand($kernel, $commandName, $commandDescription);

        $application = new Application;
        $application->add($command);

        return $application;
    }

    /**
     * {@inheritdoc}
     */
    public function createCommand($kernel, $commandName = 'run', $commandDescription = 'Run a FastCGI daemon')
    {
        return new DaemonRunCommand($commandName, $commandDescription, $this->daemonFactory, $kernel);
    }
}<commit_msg>Moved default values into DaemonRunCommand<commit_after><?php

namespace PHPFastCGI\FastCGIDaemon;

use PHPFastCGI\FastCGIDaemon\Command\DaemonRunCommand;
use Symfony\Component\Console\Application;
/**
 * The default implementation of the ApplicationFactoryInterface.
 */
class ApplicationFactory implements ApplicationFactoryInterface
{
    /**
     * @var DaemonFactoryInterface
     */
    protected $daemonFactory;

    /**
     * Constructor.
     * 
     * @param DaemonFactoryInterface $daemonFactory The factory to use to create daemons
     */
    public function __construct(DaemonFactoryInterface $daemonFactory = null)
    {
        $this->daemonFactory = $daemonFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function createApplication($kernel, $commandName = null, $commandDescription = null)
    {
        $command = $this->createCommand($kernel, $commandName, $commandDescription);

        $application = new Application;
        $application->add($command);

        return $application;
    }

    /**
     * {@inheritdoc}
     */
    public function createCommand($kernel, $commandName = null, $commandDescription = null)
    {
        return new DaemonRunCommand($kernel, $this->daemonFactory, $commandName, $commandDescription);
    }
}
{'fraction_non_alphanumeric': 0.10771524412970555, 'fraction_numerical': 0.0, 'mean_word_length': 3.1612403100775195, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '487340', 'n_tokens_mistral': 735, 'n_tokens_neox': 719, 'n_words': 159}