<commit_before><?php
/*
 * This file is part of the Sonata package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sonata\MediaBundle\DependencyInjection;

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();
        $node = $treeBuilder->root('sonata_media')->children();


//        providers:
//            sonata.media.provider.file:
//                resizer:    false
//                filesystem: sonata.media.filesystem.local
//                cdn:        sonata.media.cdn.server
//                generator:  sonata.media.generator.default
//                thumbnail:  sonata.media.thumbnail.format
//
//            sonata.media.provider.image:
//                resizer:    sonata.media.resizer.simple # sonata.media.resizer.square
//                filesystem: sonata.media.filesystem.local
//                cdn:        sonata.media.cdn.server
//                generator:  sonata.media.generator.default
//                thumbnail:  sonata.media.thumbnail.format
//
//            sonata.media.provider.youtube:
//                resizer:    sonata.media.resizer.simple
//                filesystem: sonata.media.filesystem.local
//                cdn:        sonata.media.cdn.server
//                generator:  sonata.media.generator.default
//                thumbnail:  sonata.media.thumbnail.format
//
//            sonata.media.provider.dailymotion:
//                resizer:    sonata.media.resizer.simple
//                filesystem: sonata.media.filesystem.local
//                cdn:        sonata.media.cdn.server
//                generator:  sonata.media.generator.default
//                thumbnail:  sonata.media.thumbnail.format


        $node
            ->scalarNode('db_driver')->isRequired()->end()
            ->scalarNode('default_context')->isRequired()->end()
            ->arrayNode('contexts')
                ->useAttributeAsKey('id')
                ->prototype('array')
                    ->children()
                        ->arrayNode('download')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('strategy')->defaultValue('sonata.media.security.superadmin_strategy')->end()
                                ->scalarNode('mode')->defaultValue('http')->end()
                            ->end()
                        ->end()
                        ->arrayNode('providers')
                            ->addDefaultsIfNotSet()
                            ->prototype('scalar')
                                ->defaultValue(array())
                            ->end()<commit_msg>Remove comments<commit_after><?php
/*
 * This file is part of the Sonata package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sonata\MediaBundle\DependencyInjection;

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();
        $node = $treeBuilder->root('sonata_media')->children();

        $node
            ->scalarNode('db_driver')->isRequired()->end()
            ->scalarNode('default_context')->isRequired()->end()
            ->arrayNode('contexts')
                ->useAttributeAsKey('id')
                ->prototype('array')
                    ->children()
                        ->arrayNode('download')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('strategy')->defaultValue('sonata.media.security.superadmin_strategy')->end()
                                ->scalarNode('mode')->defaultValue('http')->end()
                            ->end()
                        ->end()
                        ->arrayNode('providers')
                            ->addDefaultsIfNotSet()
                            ->prototype('scalar')
                                ->defaultValue(array())
                            ->end()
{'fraction_non_alphanumeric': 0.12214342001576044, 'fraction_numerical': 0.0, 'mean_word_length': 1.6456487754038562, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4922283', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1217, 'n_words': 222}