<commit_before><?php

namespace Bolt\Nut;

use Bolt\Cron;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * Nut command to run cron tasks
 *
 * @author <NAME> <<EMAIL>>
 */
class CronRunner extends BaseCommand
{
    /**
     * @see \Symfony\Component\Console\Command\Command::configure()
     */
    protected function configure()
    {
        $interims = ['  - cron.Hourly', '  - cron.Daily', '  - cron.Weekly', '  - cron.Monthly', '  - cron.Yearly'];
        $this
            ->setName('cron')
            ->setDescription('Cron virtual daemon')
            ->addOption('run', null, InputOption::VALUE_REQUIRED, "Run a particular interim's jobs:\n" . implode("\n", $interims));
    }

    /**
     * @see \Symfony\Component\Console\Command\Command::execute()
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        if ($input->getOption('run')) {
            $event = $input->getOption('run');
            $param = [
                'run'   => true,
                'event' => $event
            ];
        } else {
            $param = [
                'run'   => false,
                'event' => ''
            ];
        }

        $result = new Cron($this->app, $output, $param);
        if ($result) {
            if ($event) {
                $this->auditLog(__CLASS__, "Cron $event job run");
            } else {
                $this->auditLog(__CLASS__, 'Cron run');
            }
            $output->writeln("<info>Cron run!</info>");
        }
    }
}<commit_msg>Ensure variable has a value <commit_after><?php

namespace Bolt\Nut;

use Bolt\Cron;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * Nut command to run cron tasks
 *
 * @author <NAME> <<EMAIL>>
 */
class CronRunner extends BaseCommand
{
    /**
     * @see \Symfony\Component\Console\Command\Command::configure()
     */
    protected function configure()
    {
        $interims = ['  - cron.Hourly', '  - cron.Daily', '  - cron.Weekly', '  - cron.Monthly', '  - cron.Yearly'];
        $this
            ->setName('cron')
            ->setDescription('Cron virtual daemon')
            ->addOption('run', null, InputOption::VALUE_REQUIRED, "Run a particular interim's jobs:\n" . implode("\n", $interims));
    }

    /**
     * @see \Symfony\Component\Console\Command\Command::execute()
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        if ($input->getOption('run')) {
            $event = $input->getOption('run');
            $param = [
                'run'   => true,
                'event' => $event
            ];
        } else {
            $event = false;
            $param = [
                'run'   => false,
                'event' => ''
            ];
        }

        $result = new Cron($this->app, $output, $param);
        if ($result) {
            if ($event) {
                $this->auditLog(__CLASS__, "Cron $event job run");
            } else {
                $this->auditLog(__CLASS__, 'Cron run');
            }
            $output->writeln("<info>Cron run!</info>");
        }
    }
}
{'fraction_non_alphanumeric': 0.15859163406560337, 'fraction_numerical': 0.0, 'mean_word_length': 1.8630490956072352, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 39, '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': '6575695', 'n_tokens_mistral': 1009, 'n_tokens_neox': 974, 'n_words': 191}