<?php

namespace KupShop\BalikonosBundle\Resources\script;

use KupShop\AdminBundle\Util\Script\Script;
use KupShop\BalikonosBundle\EventSubscriber\CronSubscriber;
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;

class balikobotRunCheckPackages extends Script
{
    use \DatabaseCommunication;

    protected static $name = 'Balikobot spustit kontrolu stavu doručení (handleCheckPackages()).';

    protected function run(array $arguments)
    {
        $balikobotCronSubscriber = ServiceContainer::getService(CronSubscriber::class);
        $balikobotCronSubscriber->handleCheckPackages();

        $this->log('Dokončeno');
    }
}

return balikobotRunCheckPackages::class;
