<commit_before><?php

namespace Bolt\Composer\Script;

use Bolt\Configuration\PathResolver;
use Bolt\Nut\Helper\Table;
use Bolt\Nut\Output\ModifiableOutput;
use Bolt\Nut\Output\ModifiableOutputInterface;
use Bolt\Nut\Style\NutStyle;
use Composer\IO\ConsoleIO;
use Composer\IO\IOInterface;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
use Webmozart\PathUtil\Path;

/**
 * Interactively allows CLI user to modify PathResolver paths.
 *
 * @author <NAME> <<EMAIL>>
 */
final class PathCustomizer
{
    /** @var PathResolver */
    private $resolver;
    /** @var InputInterface */
    private $input;
    /** @var ModifiableOutputInterface */
    private $output;
    /** @var NutStyle */
    private $io;
    /** @var Table */
    private $pathsTable;

    /**
     * Constructor.
     *
     * @param PathResolver    $resolver
     * @param InputInterface  $input
     * @param OutputInterface $output
     */
    public function __construct(PathResolver $resolver, InputInterface $input, OutputInterface $output)
    {
        if ($output instanceof ConsoleOutputInterface) {
            $output = $output->getErrorOutput();
        }
        if (!$output instanceof ModifiableOutputInterface) {
            $output = new ModifiableOutput($output);
        }

        $this->resolver = $resolver;
        $this->input = $input;
        $this->output = $output;

        $this->io = new NutStyle($input, $output);
    }

    /**
     * Create PathCustomizer from Composer's IOInterface.<commit_msg>Fix class names<commit_after><?php

namespace Bolt\Composer\Script;

use Bolt\Configuration\PathResolver;
use Bolt\Nut\Helper\Table;
use Bolt\Nut\Output\OverwritableOutput;
use Bolt\Nut\Output\OverwritableOutputInterface;
use Bolt\Nut\Style\NutStyle;
use Composer\IO\ConsoleIO;
use Composer\IO\IOInterface;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
use Webmozart\PathUtil\Path;

/**
 * Interactively allows CLI user to modify PathResolver paths.
 *
 * @author <NAME> <<EMAIL>>
 */
final class PathCustomizer
{
    /** @var PathResolver */
    private $resolver;
    /** @var InputInterface */
    private $input;
    /** @var OverwritableOutputInterface */
    private $output;
    /** @var NutStyle */
    private $io;
    /** @var Table */
    private $pathsTable;

    /**
     * Constructor.
     *
     * @param PathResolver    $resolver
     * @param InputInterface  $input
     * @param OutputInterface $output
     */
    public function __construct(PathResolver $resolver, InputInterface $input, OutputInterface $output)
    {
        if ($output instanceof ConsoleOutputInterface) {
            $output = $output->getErrorOutput();
        }
        if (!$output instanceof OverwritableOutputInterface) {
            $output = new OverwritableOutput($output);
        }

        $this->resolver = $resolver;
        $this->input = $input;
        $this->output = $output;

        $this->io = new NutStyle($input, $output);
    }

    /**
     * Create PathCustomizer from Composer's IOInterface.
{'fraction_non_alphanumeric': 0.11744776962168267, 'fraction_numerical': 0.0, 'mean_word_length': 3.2635379061371843, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, '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': '3297553', 'n_tokens_mistral': 1031, 'n_tokens_neox': 1022, 'n_words': 223}