<commit_before><?php

declare(strict_types=1);

namespace Doctrine\Bundle\MigrationsBundle\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

use function count;
use function current;
use function key;

/**
 * DoctrineMigrationsExtension.
 */
class DoctrineMigrationsExtension extends Extension
{
    /**
     * Responds to the migrations configuration parameter.
     *
     * @param mixed[][] $configs
     *
     * @psalm-param array<string, array<string, array<string, string>|string>>> $configs
     */
    public function load(array $configs, ContainerBuilder $container): void
    {
        $configuration = new Configuration();

        $config = $this->processConfiguration($configuration, $configs);

        // 3.x forward compatibility layer
        if (isset($config['migrations_paths']) && count($config['migrations_paths']) > 0) {
            $config['namespace'] = key($config['migrations_paths']);
            $config['dir_name']  = current($config['migrations_paths']);
            unset($config['migrations_paths']);
        }

        if (isset($config['storage']['table_storage'])) {
            $storageConfig = $config['storage']['table_storage'];
            if (isset($storageConfig['table_name'])) {
                $config['table_name'] = $storageConfig['table_name'];
            }

            if (isset($storageConfig['version_column_name'])) {
                $config['column_name'] = $storageConfig['version_column_name'];
            }

            if (isset($storageConfig['version_column_length'])) {
                $config['column_length'] = $storageConfig['version_column_length'];
            }

            if (isset($storageConfig['executed_at_column_name'])) {
                $config['executed_at_column_name'] = $storageConfig['executed_at_column_name'];
            }<commit_msg>Make phpdoc correct<commit_after><?php

declare(strict_types=1);

namespace Doctrine\Bundle\MigrationsBundle\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

use function count;
use function current;
use function key;

/**
 * DoctrineMigrationsExtension.
 */
class DoctrineMigrationsExtension extends Extension
{
    /**
     * Responds to the migrations configuration parameter.
     *
     * @param mixed[][] $configs
     *
     * @psalm-param array<string, array<string, array<string, array<string, string>|string>|string>> $configs
     */
    public function load(array $configs, ContainerBuilder $container): void
    {
        $configuration = new Configuration();

        $config = $this->processConfiguration($configuration, $configs);

        // 3.x forward compatibility layer
        if (isset($config['migrations_paths']) && count($config['migrations_paths']) > 0) {
            $config['namespace'] = key($config['migrations_paths']);
            $config['dir_name']  = current($config['migrations_paths']);
            unset($config['migrations_paths']);
        }

        if (isset($config['storage']['table_storage'])) {
            $storageConfig = $config['storage']['table_storage'];
            if (isset($storageConfig['table_name'])) {
                $config['table_name'] = $storageConfig['table_name'];
            }

            if (isset($storageConfig['version_column_name'])) {
                $config['column_name'] = $storageConfig['version_column_name'];
            }

            if (isset($storageConfig['version_column_length'])) {
                $config['column_length'] = $storageConfig['version_column_length'];
            }

            if (isset($storageConfig['executed_at_column_name'])) {
                $config['executed_at_column_name'] = $storageConfig['executed_at_column_name'];
            }
{'fraction_non_alphanumeric': 0.1350821279725423, 'fraction_numerical': 0.0014709487619514587, 'mean_word_length': 3.4060475161987043, 'pattern_counts': {'":': 0, '<': 12, '<?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': '6031926', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1077, 'n_words': 177}