<commit_before><?php

namespace Digilist\SnakeDumper\Configuration;

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

class SnakeConfigurationTree implements ConfigurationInterface
{

    /**
     * Generates the configuration tree builder.
     *
     * @return TreeBuilder The tree builder
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('anonymizer');

        $rootChildrenNode = $rootNode->children();

        // Property for dumper to use
        $rootChildrenNode->scalarNode('dumper')->cannotBeEmpty()->isRequired()->end();

        $rootChildrenNode
            ->arrayNode('output')
                ->children()
                    ->scalarNode('rows_per_statement')->end()
                    ->scalarNode('file')->defaultValue('php://stdout')->end()
                    ->booleanNode('gzip')->defaultFalse()->end()
                ->end()
            ->end()
        ;

        $rootChildrenNode
            ->arrayNode('database')
                ->children()
                    ->scalarNode('driver')->end()
                    ->scalarNode('host')->end()
                    ->scalarNode('port')->defaultValue('3306')->end()
                    ->scalarNode('user')->end()
                    ->scalarNode('password')->end()
                    ->scalarNode('dbname')->end()
                    ->scalarNode('charset')->end()
                ->end()
            ->end()
        ;

        $rootChildrenNode
            ->arrayNode('table_white_list')
                ->prototype('scalar')
                ->end()
            ->end()
        ;<commit_msg>Change default value to empty so that the driver can decide what to take<commit_after><?php

namespace Digilist\SnakeDumper\Configuration;

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

class SnakeConfigurationTree implements ConfigurationInterface
{

    /**
     * Generates the configuration tree builder.
     *
     * @return TreeBuilder The tree builder
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('anonymizer');

        $rootChildrenNode = $rootNode->children();

        // Property for dumper to use
        $rootChildrenNode->scalarNode('dumper')->cannotBeEmpty()->isRequired()->end();

        $rootChildrenNode
            ->arrayNode('output')
                ->children()
                    ->scalarNode('rows_per_statement')->end()
                    ->scalarNode('file')->defaultValue('php://stdout')->end()
                    ->booleanNode('gzip')->defaultFalse()->end()
                ->end()
            ->end()
        ;

        $rootChildrenNode
            ->arrayNode('database')
                ->children()
                    ->scalarNode('driver')->end()
                    ->scalarNode('host')->end()
                    ->scalarNode('port')->defaultValue(null)->end()
                    ->scalarNode('user')->end()
                    ->scalarNode('password')->end()
                    ->scalarNode('dbname')->end()
                    ->scalarNode('charset')->end()
                ->end()
            ->end()
        ;

        $rootChildrenNode
            ->arrayNode('table_white_list')
                ->prototype('scalar')
                ->end()
            ->end()
        ;
{'fraction_non_alphanumeric': 0.1460515142938013, 'fraction_numerical': 0.0011321822813472968, 'mean_word_length': 1.7695924764890283, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4322971', 'n_tokens_mistral': 865, 'n_tokens_neox': 815, 'n_words': 137}