<commit_before><?php
/*
 * Copyright (c) Ouzo contributors, http://ouzoframework.org
 * This file is made available under the MIT License (view the LICENSE file for more information).
 */

namespace Command;


use Ouzo\Utilities\Clock;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class MigrationGeneratorCommand extends Command
{
    /* @var InputInterface */
    private $input;
    /* @var OutputInterface */
    private $output;

    public function configure()
    {
        $this->setName('migration:generate')
            ->addArgument('name', InputArgument::REQUIRED, 'Migration name')
            ->addArgument('dir', InputArgument::OPTIONAL, 'Migration directory');
    }

    public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;

        $name = $this->input->getArgument('name');
        $dir = $this->input->getArgument('dir');
        $dir = $dir ? $dir . '/' : '';
        $clock = Clock::now();
        $date = $clock->format('Ymd');
        $time = $clock->getTimestamp();
        $path = "{$dir}{$date}{$time}_{$name}Migration.php";
<commit_msg>[migrations] Removed Migration class suffix.<commit_after><?php
/*
 * Copyright (c) Ouzo contributors, http://ouzoframework.org
 * This file is made available under the MIT License (view the LICENSE file for more information).
 */

namespace Command;


use Ouzo\Utilities\Clock;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class MigrationGeneratorCommand extends Command
{
    /* @var InputInterface */
    private $input;
    /* @var OutputInterface */
    private $output;

    public function configure()
    {
        $this->setName('migration:generate')
            ->addArgument('name', InputArgument::REQUIRED, 'Migration name')
            ->addArgument('dir', InputArgument::OPTIONAL, 'Migration directory');
    }

    public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;

        $name = $this->input->getArgument('name');
        $dir = $this->input->getArgument('dir');
        $dir = $dir ? $dir . '/' : '';
        $clock = Clock::now();
        $date = $clock->format('Ymd');
        $time = $clock->getTimestamp();
        $path = "{$dir}{$date}{$time}_{$name}.php";

{'fraction_non_alphanumeric': 0.14852607709750568, 'fraction_numerical': 0.0, 'mean_word_length': 3.3536184210526314, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '3289751', 'n_tokens_mistral': 742, 'n_tokens_neox': 741, 'n_words': 170}