PhpSpec\Console\Command\RunCommand::execute PHP Метод

execute() защищенный Метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : mixed
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат mixed
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $container = $this->getApplication()->getContainer();
        $container->setParam('formatter.name', $input->getOption('format') ?: $container->getParam('formatter.name'));
        $formatterName = $container->getParam('formatter.name', 'progress');
        $currentFormatter = $container->get('formatter.formatters.' . $formatterName);
        if ($currentFormatter instanceof FatalPresenter) {
            $container->define('process.shutdown.update_console_action', function (IndexedServiceContainer $c) use($currentFormatter) {
                return new UpdateConsoleAction($c->get('current_example'), $currentFormatter);
            });
            $container->get('process.shutdown')->registerAction($container->get('process.shutdown.update_console_action'));
            $container->get('process.shutdown')->registerShutdown();
        }
        $container->configure();
        $locator = $input->getArgument('spec');
        $linenum = null;
        if (preg_match('/^(.*)\\:(\\d+)$/', $locator, $matches)) {
            list($_, $locator, $linenum) = $matches;
        }
        $suite = $container->get('loader.resource_loader')->load($locator, $linenum);
        $suiteRunner = $container->get('runner.suite');
        return $container->get('console.result_converter')->convert($suiteRunner->run($suite));
    }