<commit_before><?php
/**
 * This file belongs to the AnoynmFramework
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 * Thanks for using
 */


namespace Anonym\Components\Console\Schedule;

use Anonym\Components\Cron\Cron as Schedule;
use Anonym\Components\Cron\EventReposity;
use Anonym\Components\Console\Command;
use Anonym\Components\Cron\Task\Task;
use Anonym\Components\Cron\Task\TaskReposity;

class ScheduleRunCommands extends Command implements ScheduleInterface
{

    /**
     * signature of command
     *
     * @var string
     */
    protected $name = 'schedule:run';

    /**
     * description of command
     *
     * @var string
     */
    protected $description = 'Run the scheduled commands';

    /**
     * the instance of cron
     *
     * @var Schedule
     */
    protected $schedule;

    /**
     * create a new instance and register schedule instance to $schedule variable
     */
    public function __construct(Schedule $schedule = null)
    {
        $this->schedule = $schedule;
        $this->schedule->install(Task::console('schedule:run'));
        parent::__construct();
    }

    /**
     * Komut yakalandığı zaman tetiklenecek fonksiyonlardan biridir
     * @return mixed
     */
    public function fire()
    {
        $schedule = $this->schedule;

        $events = $schedule->dueEvents($schedule->getEvents());

        if (!count($events)) {
            $this->error('There isnt any event from schedule');

            return false;
        }

        foreach ($events as $event) {

            if ($event instanceof TaskReposity) {
                $this->info(sprintf('%s Command is Runnig', $event->getCommand()));

                $event->execute();
            }
        }
    }
}<commit_msg>fixed a little bug<commit_after><?php
/**
 * This file belongs to the AnoynmFramework
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 * Thanks for using
 */


namespace Anonym\Components\Console\Schedule;

use Anonym\Components\Cron\Cron as Schedule;
use Anonym\Components\Cron\EventReposity;
use Anonym\Components\Console\Command;
use Anonym\Components\Cron\Task\Task;
use Anonym\Components\Cron\Task\TaskReposity;

class ScheduleRunCommands extends Command implements ScheduleInterface
{

    /**
     * signature of command
     *
     * @var string
     */
    protected $name = 'schedule:run';

    /**
     * description of command
     *
     * @var string
     */
    protected $description = 'Run the scheduled commands';

    /**
     * the instance of cron
     *
     * @var Schedule
     */
    protected $schedule;

    /**
     * create a new instance and register schedule instance to $schedule variable
     */
    public function __construct(Schedule $schedule = null)
    {
        $this->schedule = $schedule;
        $this->schedule->install(Task::console('schedule:run'));
        parent::__construct();
    }

    /**
     * Komut yakalandığı zaman tetiklenecek fonksiyonlardan biridir
     * @return mixed
     */
    public function fire()
    {
        $schedule = $this->schedule;

        $events = $schedule->dueEvents($schedule->getEvents());

        if (!count($events)) {
            $this->error('There isnt any event from schedule');

            return false;
        }

        foreach ($events as $event) {

            if ($event instanceof TaskReposity) {
                $this->info(sprintf('%s Command is Runnig', $event->getSummaryForDescription()));

                $event->execute();
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.12075259758494805, 'fraction_numerical': 0.0, 'mean_word_length': 2.360377358490566, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 27, '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': '412226', 'n_tokens_mistral': 1020, 'n_tokens_neox': 990, 'n_words': 245}