<commit_before><?php

/*
 * This file is part of CacheTool.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CacheTool\Command;

use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ApcKeyFetchCommand extends AbstractCommand
{
    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this
            ->setName('apc:key:fetch')
            ->setDescription('Shows the content of an APC key')
            ->addArgument('key', InputArgument::REQUIRED)
            ->setHelp('');
    }

    /**
     * {@inheritdoc}
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->ensureExtensionLoaded('apc');

        $key = $input->getArgument('key');

        $success = new \stdClass();
        $value = $this->getCacheTool()->apc_fetch($key, $success);

        if ($success->success) {
            $output->writeln("<comment>APC key <info>{$key}</info> has value=<info>{$value}</info></comment>");
        } else {
            $output->writeln("<comment>APC key <info>{$key}</info> does not exist.</comment>");
            return 1;
        }

    }
}<commit_msg>normalize output<commit_after><?php

/*
 * This file is part of CacheTool.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CacheTool\Command;

use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ApcKeyFetchCommand extends AbstractCommand
{
    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this
            ->setName('apc:key:fetch')
            ->setDescription('Shows the content of an APC key')
            ->addArgument('key', InputArgument::REQUIRED)
            ->setHelp('');
    }

    /**
     * {@inheritdoc}
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->ensureExtensionLoaded('apc');

        $key = $input->getArgument('key');

        $success = new \stdClass();
        $value = $this->getCacheTool()->apc_fetch($key, $success);

        if ($success->success) {
            $output->writeln("<comment>APC key=<info>{$key}</info> has value=<info>{$value}</info></comment>");
        } else {
            $output->writeln("<comment>APC key=<info>{$key}</info> does not exist.</comment>");
            return 1;
        }
    }
}
{'fraction_non_alphanumeric': 0.15054545454545454, 'fraction_numerical': 0.0007272727272727272, 'mean_word_length': 2.722598105548038, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 51, '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': '2392132', 'n_tokens_mistral': 790, 'n_tokens_neox': 779, 'n_words': 177}