<commit_before><?php

namespace Elastification\Bundle\ElastificationPhpClientBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

/**
 * This is the class that validates and merges configuration from your app/config files
 *
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
 */
class Configuration implements ConfigurationInterface
{
    /**
     * {@inheritdoc}
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('elastification_php_client');

        $this->addSection($rootNode);

        return $treeBuilder;
    }

    /**
     * @param ArrayNodeDefinition $rootNode
     * @author <NAME>
     */
    private function addSection(ArrayNodeDefinition $rootNode)
    {
        $rootNode
            ->children()
                ->scalarNode('host')
                    ->isRequired()
                ->end()

                ->scalarNode('port')
                    ->defaultValue(9200)
                ->end()

                ->scalarNode('protocol')
                    ->defaultValue('http')
                ->end()

                ->scalarNode('elasticsearch_version')
                    ->defaultNull()
                ->end()

                ->scalarNode('repository_serializer_dic_id')
                    ->defaultNull()
                ->end()

                ->booleanNode('replace_version_of_tagged_requests')
                    ->defaultValue(false)
                ->end()

                ->booleanNode('logging_enabled')
                    ->defaultValue('%kernel.debug%')
                ->end()

                ->booleanNode('profiler_enabled')
                    ->defaultValue(true)
                ->end()

                ->arrayNode('jms_serializer_class_map')
                    ->canBeUnset()
                    ->prototype('array')
                        ->children()
                            ->scalarNode('index')
                                ->isRequired()
                            ->end()
                            ->scalarNode('type')
                                ->isRequired()
                            ->end()<commit_msg>fixed bug of not implemented config options<commit_after><?php

namespace Elastification\Bundle\ElastificationPhpClientBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

/**
 * This is the class that validates and merges configuration from your app/config files
 *
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
 */
class Configuration implements ConfigurationInterface
{
    /**
     * {@inheritdoc}
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('elastification_php_client');

        $this->addSection($rootNode);

        return $treeBuilder;
    }

    /**
     * @param ArrayNodeDefinition $rootNode
     * @author <NAME>
     */
    private function addSection(ArrayNodeDefinition $rootNode)
    {
        $rootNode
            ->children()
                ->scalarNode('host')
                    ->isRequired()
                ->end()

                ->scalarNode('port')
                    ->defaultValue(9200)
                ->end()

                ->scalarNode('protocol')
                    ->defaultValue('http')
                ->end()

                ->scalarNode('elasticsearch_version')
                    ->defaultNull()
                ->end()

                ->scalarNode('search_repository_serializer_dic_id')
                    ->defaultNull()
                ->end()

                ->scalarNode('index_repository_serializer_dic_id')
                    ->defaultNull()
                ->end()

                ->scalarNode('document_repository_serializer_dic_id')
                    ->defaultNull()
                ->end()

                ->booleanNode('replace_version_of_tagged_requests')
                    ->defaultValue(false)
                ->end()

                ->booleanNode('logging_enabled')
                    ->defaultValue('%kernel.debug%')
                ->end()

                ->booleanNode('profiler_enabled')
                    ->defaultValue(true)
                ->end()

                ->arrayNode('jms_serializer_class_map')
                    ->canBeUnset()
                    ->prototype('array')
                        ->children()
                            ->scalarNode('index')
                                ->isRequired()
                            ->end()
                            ->scalarNode('type')
                                ->isRequired()
                            ->end()
{'fraction_non_alphanumeric': 0.11342943854324734, 'fraction_numerical': 0.0015174506828528073, 'mean_word_length': 1.5217599234815877, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 85, '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': '3815116', 'n_tokens_mistral': 1297, 'n_tokens_neox': 1206, 'n_words': 193}