<commit_before><?php
/**
 * @file
 * Contains \Drupal\AppConsole\EventSubscriber\CallCommandListener.
 */

namespace Drupal\AppConsole\EventSubscriber;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
use Symfony\Component\Console\Input\ArrayInput;
use Drupal\AppConsole\Command\Command;
use Symfony\Component\Console\ConsoleEvents;

class CallCommandListener implements EventSubscriberInterface
{
    /**
     * @param ConsoleTerminateEvent $event
     */
    public function callCommands(ConsoleTerminateEvent $event)
    {
        /** @var \Drupal\AppConsole\Command\Command $command */
        $command = $event->getCommand();
        $output = $event->getOutput();

        if (!$command instanceof Command) {
            return;
        }

        $commands = $command->getHelper('chain')->getCommands();

        if (!$commands) {
            return;
        }

        $application = $command->getApplication();
        foreach ($commands as $chainedCommand) {
            $callCommand = $application->find($chainedCommand['name']);

            $input = new ArrayInput($chainedCommand['arguments']);
            $callCommand->run($input, $output);
        }
    }<commit_msg>Update call to arguments to inputs<commit_after><?php
/**
 * @file
 * Contains \Drupal\AppConsole\EventSubscriber\CallCommandListener.
 */

namespace Drupal\AppConsole\EventSubscriber;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
use Symfony\Component\Console\Input\ArrayInput;
use Drupal\AppConsole\Command\Command;
use Symfony\Component\Console\ConsoleEvents;

class CallCommandListener implements EventSubscriberInterface
{
    /**
     * @param ConsoleTerminateEvent $event
     */
    public function callCommands(ConsoleTerminateEvent $event)
    {
        /** @var \Drupal\AppConsole\Command\Command $command */
        $command = $event->getCommand();
        $output = $event->getOutput();

        if (!$command instanceof Command) {
            return;
        }

        $commands = $command->getHelper('chain')->getCommands();

        if (!$commands) {
            return;
        }

        $application = $command->getApplication();
        foreach ($commands as $chainedCommand) {
            $callCommand = $application->find($chainedCommand['name']);

            $input = new ArrayInput($chainedCommand['inputs']);
            $callCommand->run($input, $output);
        }
    }
{'fraction_non_alphanumeric': 0.12460567823343849, 'fraction_numerical': 0.0, 'mean_word_length': 3.105177993527508, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6191560', 'n_tokens_mistral': 666, 'n_tokens_neox': 666, 'n_words': 119}