<commit_before><?php
/**
 * Author: jack<<EMAIL>>
 * Date: 15/7/6
 */

namespace Wiz\ResqueBundle\DependencyInjection;

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

/**
 * Class Configuration
 * @package Wiz\ResqueBundle\DependencyInjection
 */
class Configuration implements ConfigurationInterface
{
    /**
     * {@inheritDoc}
     */
    public function getConfigTreeBuilder()
    {
        $tree_builder = new TreeBuilder();
        $root = $tree_builder->root('wiz_resque');

        $root
            ->addDefaultsIfNotSet()
            ->children()
                ->arrayNode('redis')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('host')
                            ->defaultValue('127.0.0.1')
                            ->cannotBeEmpty()
                        ->end()
                        ->scalarNode('port')
                            ->defaultValue(6379)
                            ->cannotBeEmpty()
                        ->end()
                        ->scalarNode('database')
                            ->defaultValue(0)
                        ->end()
                    ->end()
                ->end()
            ->end();

        return $tree_builder;
    }
}<commit_msg>add prefix config support<commit_after><?php
/**
 * Author: jack<<EMAIL>>
 * Date: 15/7/6
 */

namespace Wiz\ResqueBundle\DependencyInjection;

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

/**
 * Class Configuration
 * @package Wiz\ResqueBundle\DependencyInjection
 */
class Configuration implements ConfigurationInterface
{
    /**
     * {@inheritDoc}
     */
    public function getConfigTreeBuilder()
    {
        $tree_builder = new TreeBuilder();
        $root = $tree_builder->root('wiz_resque');

        $root
            ->addDefaultsIfNotSet()
            ->children()
                ->scalarNode('prefix')
                    ->isRequired()
                ->end()
                ->arrayNode('redis')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('host')
                            ->defaultValue('127.0.0.1')
                            ->cannotBeEmpty()
                        ->end()
                        ->scalarNode('port')
                            ->defaultValue(6379)
                            ->cannotBeEmpty()
                        ->end()
                        ->scalarNode('database')
                            ->defaultValue(0)
                        ->end()
                    ->end()
                ->end()
            ->end();

        return $tree_builder;
    }
}
{'fraction_non_alphanumeric': 0.12357954545454546, 'fraction_numerical': 0.01065340909090909, 'mean_word_length': 1.2644694533762058, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1993291', 'n_tokens_mistral': 710, 'n_tokens_neox': 661, 'n_words': 106}