<commit_before><?php

namespace Shopsys\MigrationBundle\Command;

use Shopsys\MigrationBundle\Component\Doctrine\DatabaseSchemaFacade;
use Shopsys\MigrationBundle\Component\Doctrine\Migrations\MigrationsLocator;
use Shopsys\MigrationBundle\Component\Generator\MigrationsGenerator;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\KernelInterface;

class GenerateMigrationCommand extends AbstractCommand
{
    private const RETURN_CODE_OK = 0;
    private const RETURN_CODE_ERROR = 1;

    /**
     * @var string
     */
    protected static $defaultName = 'shopsys:migrations:generate';

    /**
     * @var \Shopsys\MigrationBundle\Component\Doctrine\DatabaseSchemaFacade
     */
    private $databaseSchemaFacade;

    /**
     * @var \Shopsys\MigrationBundle\Component\Generator\MigrationsGenerator
     */
    private $migrationsGenerator;

    /**
     * @var \Shopsys\MigrationBundle\Component\Doctrine\Migrations\MigrationsLocator
     */
    private $migrationsLocator;

    /**
     * @var \Symfony\Component\HttpKernel\KernelInterface
     */
    private $kernel;

    /**
     * @var string
     */
    private $vendorDirectoryPath;

    /**
     * @param string $vendorDirectoryPath
     * @param \Shopsys\MigrationBundle\Component\Doctrine\DatabaseSchemaFacade $databaseSchemaFacade
     * @param \Shopsys\MigrationBundle\Component\Generator\MigrationsGenerator $migrationsGenerator
     * @param \Shopsys\MigrationBundle\Component\Doctrine\Migrations\MigrationsLocator $migrationsLocator
     * @param \Symfony\Component\HttpKernel\KernelInterface $kernel
     */
    public function __construct(
        $vendorDirectoryPath,
        DatabaseSchemaFacade $databaseSchemaFacade,
        MigrationsGenerator $migrationsGenerator,
        MigrationsLocator $migrationsLocator,
        KernelInterface $kernel
    ) {
        $this->databaseSchemaFacade = $databaseSchemaFacade;
        $this->migrationsGenerator = $migrationsGenerator;
        $this->migrationsLocator = $migrationsLocator;
        $this->kernel = $kernel;
        $this->vendorDirectoryPath = $vendorDirectoryPath;
        parent::__construct();
    }

    protected function configure()
    {
        $this
            ->setDescription('Generate a new migration if need it');
    }

    /**
     * @param \Symfony\Component\Console\Input\InputInterface $input
     * @param \Symfony\Component\Console\Output\OutputInterface $output
     * @return int
     */
    protected function execute(InputInterface $input, OutputInterface $output)<commit_msg>added spacing around parent calls<commit_after><?php

namespace Shopsys\MigrationBundle\Command;

use Shopsys\MigrationBundle\Component\Doctrine\DatabaseSchemaFacade;
use Shopsys\MigrationBundle\Component\Doctrine\Migrations\MigrationsLocator;
use Shopsys\MigrationBundle\Component\Generator\MigrationsGenerator;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\KernelInterface;

class GenerateMigrationCommand extends AbstractCommand
{
    private const RETURN_CODE_OK = 0;
    private const RETURN_CODE_ERROR = 1;

    /**
     * @var string
     */
    protected static $defaultName = 'shopsys:migrations:generate';

    /**
     * @var \Shopsys\MigrationBundle\Component\Doctrine\DatabaseSchemaFacade
     */
    private $databaseSchemaFacade;

    /**
     * @var \Shopsys\MigrationBundle\Component\Generator\MigrationsGenerator
     */
    private $migrationsGenerator;

    /**
     * @var \Shopsys\MigrationBundle\Component\Doctrine\Migrations\MigrationsLocator
     */
    private $migrationsLocator;

    /**
     * @var \Symfony\Component\HttpKernel\KernelInterface
     */
    private $kernel;

    /**
     * @var string
     */
    private $vendorDirectoryPath;

    /**
     * @param string $vendorDirectoryPath
     * @param \Shopsys\MigrationBundle\Component\Doctrine\DatabaseSchemaFacade $databaseSchemaFacade
     * @param \Shopsys\MigrationBundle\Component\Generator\MigrationsGenerator $migrationsGenerator
     * @param \Shopsys\MigrationBundle\Component\Doctrine\Migrations\MigrationsLocator $migrationsLocator
     * @param \Symfony\Component\HttpKernel\KernelInterface $kernel
     */
    public function __construct(
        $vendorDirectoryPath,
        DatabaseSchemaFacade $databaseSchemaFacade,
        MigrationsGenerator $migrationsGenerator,
        MigrationsLocator $migrationsLocator,
        KernelInterface $kernel
    ) {
        $this->databaseSchemaFacade = $databaseSchemaFacade;
        $this->migrationsGenerator = $migrationsGenerator;
        $this->migrationsLocator = $migrationsLocator;
        $this->kernel = $kernel;
        $this->vendorDirectoryPath = $vendorDirectoryPath;

        parent::__construct();
    }

    protected function configure()
    {
        $this
            ->setDescription('Generate a new migration if need it');
    }

    /**
     * @param \Symfony\Component\Console\Input\InputInterface $input
     * @param \Symfony\Component\Console\Output\OutputInterface $output
     * @return int
     */
    protected function execute(InputInterface $input, OutputInterface $output)
{'fraction_non_alphanumeric': 0.09494248676282636, 'fraction_numerical': 0.0007303268212525105, 'mean_word_length': 3.611111111111111, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '7545058', 'n_tokens_mistral': 1503, 'n_tokens_neox': 1523, 'n_words': 243}