<commit_before><?php

namespace Oro\Bundle\SidebarBundle\DependencyInjection;

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

use Oro\Bundle\ConfigBundle\DependencyInjection\SettingsBuilder;

class Configuration implements ConfigurationInterface
{
    /**
     * {@inheritDoc}
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('oro_sidebar');

        $rootNode
            ->children()
                ->arrayNode('sidebar_widgets')
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->children()
                            ->scalarNode('title')
                                ->cannotBeEmpty()
                            ->end()
                            ->scalarNode('icon')
                                ->defaultNull()
                            ->end()
                            ->scalarNode('iconClass')
                                ->defaultNull()
                            ->end()
                            ->scalarNode('module')
                                ->cannotBeEmpty()
                            ->end()
                            ->scalarNode('cssClass')
                                ->cannotBeEmpty()
                            ->end()
                            ->scalarNode('placement')
                                ->cannotBeEmpty()
                            ->end()
                            ->variableNode('settings')
                                ->defaultNull()
                            ->end()
                        ->end()
                        ->validate()
                            ->ifTrue(function ($value) {
                                return empty($value['icon']) && empty($value['iconClass']);
                            })
                            ->thenInvalid('Should contain not empty icon or iconClass property')
                            ->end()
                        ->end()
                    ->end()
                ->end()
            ->end();

        SettingsBuilder::append(
            $rootNode,<commit_msg>BAP-3772:Change icon for Add task buttons - updated error message<commit_after><?php

namespace Oro\Bundle\SidebarBundle\DependencyInjection;

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

use Oro\Bundle\ConfigBundle\DependencyInjection\SettingsBuilder;

class Configuration implements ConfigurationInterface
{
    /**
     * {@inheritDoc}
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('oro_sidebar');

        $rootNode
            ->children()
                ->arrayNode('sidebar_widgets')
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->children()
                            ->scalarNode('title')
                                ->cannotBeEmpty()
                            ->end()
                            ->scalarNode('icon')
                                ->defaultNull()
                            ->end()
                            ->scalarNode('iconClass')
                                ->defaultNull()
                            ->end()
                            ->scalarNode('module')
                                ->cannotBeEmpty()
                            ->end()
                            ->scalarNode('cssClass')
                                ->cannotBeEmpty()
                            ->end()
                            ->scalarNode('placement')
                                ->cannotBeEmpty()
                            ->end()
                            ->variableNode('settings')
                                ->defaultNull()
                            ->end()
                        ->end()
                        ->validate()
                            ->ifTrue(function ($value) {
                                return empty($value['icon']) && empty($value['iconClass']);
                            })
                            ->thenInvalid('Either icon or iconClass option is required for sidebar widget')
                            ->end()
                        ->end()
                    ->end()
                ->end()
            ->end();

        SettingsBuilder::append(
            $rootNode,
{'fraction_non_alphanumeric': 0.1078883761810591, 'fraction_numerical': 0.0008789277081960009, 'mean_word_length': 0.920675105485232, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 75, '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': '2769496', 'n_tokens_mistral': 942, 'n_tokens_neox': 891, 'n_words': 151}