<commit_before><?php

namespace EWZ\Bundle\UploaderBundle\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();
        $rootNode = $treeBuilder->root('ewz_uploader');

        $rootNode
            ->children()
                ->booleanNode('load_jquery')->defaultFalse()->end()
                ->booleanNode('generate_unique_name')->defaultFalse()->end()
                ->booleanNode('keep_original_name')->defaultFalse()->end()
                ->scalarNode('default_filename')->defaultValue('filename')->end()

                ->arrayNode('media')
                    ->addDefaultsIfNotSet()
                    ->canBeUnset()
                    ->children()
                        ->scalarNode('max_size')->defaultValue('1024k')->end()
                        ->arrayNode('mime_types')
                            ->prototype('scalar')->defaultNull()->end()
                        ->end()
                        ->scalarNode('dir')->defaultValue('%kernel.root_dir%/../web')->end()
                        ->scalarNode('folder')->defaultValue('uploads')->end()
                        ->scalarNode('image_min_width')->defaultValue('180')->end()
                        ->scalarNode('image_min_height')->defaultValue('180')->end()
                    ->end()
                ->end()

                ->arrayNode('url')
                    ->addDefaultsIfNotSet()
                    ->canBeUnset()
                    ->children()
                        ->scalarNode('upload')->defaultValue('ewz_uploader_file_upload')->end()
                        ->scalarNode('remove')->defaultValue('ewz_uploader_file_remove')->end()
                        ->scalarNode('download')->defaultValue('ewz_uploader_file_download')->end()
                        ->scalarNode('crop')->defaultValue('ewz_uploader_file_crop')->end()
                    ->end()
                ->end()
            ->end()
        ;

        return $treeBuilder;
    }
}<commit_msg>Alteracao para inclusao da opcao de redimensionamento da imagem apos o cropp.<commit_after><?php

namespace EWZ\Bundle\UploaderBundle\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();
        $rootNode = $treeBuilder->root('ewz_uploader');

        $rootNode
            ->children()
                ->booleanNode('load_jquery')->defaultFalse()->end()
                ->booleanNode('generate_unique_name')->defaultFalse()->end()
                ->booleanNode('keep_original_name')->defaultFalse()->end()
                ->scalarNode('default_filename')->defaultValue('filename')->end()

                ->arrayNode('media')
                    ->addDefaultsIfNotSet()
                    ->canBeUnset()
                    ->children()
                        ->scalarNode('max_size')->defaultValue('1024k')->end()
                        ->arrayNode('mime_types')
                            ->prototype('scalar')->defaultNull()->end()
                        ->end()
                        ->scalarNode('dir')->defaultValue('%kernel.root_dir%/../web')->end()
                        ->scalarNode('folder')->defaultValue('uploads')->end()
                        ->scalarNode('image_min_width')->defaultValue('180')->end()
                        ->scalarNode('image_min_height')->defaultValue('180')->end()
                        ->scalarNode('image_max_width')->defaultValue('924')->end()
                        ->scalarNode('image_resize_to_max')->defaultTrue()->end()
                    ->end()
                ->end()

                ->arrayNode('url')
                    ->addDefaultsIfNotSet()
                    ->canBeUnset()
                    ->children()
                        ->scalarNode('upload')->defaultValue('ewz_uploader_file_upload')->end()
                        ->scalarNode('remove')->defaultValue('ewz_uploader_file_remove')->end()
                        ->scalarNode('download')->defaultValue('ewz_uploader_file_download')->end()
                        ->scalarNode('crop')->defaultValue('ewz_uploader_file_crop')->end()
                    ->end()
                ->end()
            ->end()
        ;

        return $treeBuilder;
    }
}
{'fraction_non_alphanumeric': 0.15114474194800157, 'fraction_numerical': 0.00446255335661622, 'mean_word_length': 1.8782802903405917, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 127, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7470377', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1215, 'n_words': 157}