<commit_before><?php

namespace Oro\Bundle\SidebarBundle\Model;

use Doctrine\Common\Collections\ArrayCollection;
use Oro\Bundle\FeatureToggleBundle\Checker\FeatureChecker;

class WidgetDefinitionRegistry
{
    const SIDEBAR_WIDGET_FEATURE_NAME = 'sidebar_widgets';

    /**
     * @var ArrayCollection
     */
    protected $widgetDefinitions;

    /**
     * @param array $definitions
     */
    public function __construct(array $definitions, FeatureChecker $featureChecker)
    {
        $this->featureChecker = $featureChecker;
        $this->widgetDefinitions = new ArrayCollection();

        $this->setWidgetDefinitions($definitions);
    }

    /**
     * @param array $definitions
     */
    public function setWidgetDefinitions(array $definitions)
    {
        foreach ($definitions as $name => $definition) {
            $this->widgetDefinitions->set($name, $definition);
        }
    }

    /**
     * @return ArrayCollection
     */<commit_msg>CRM-6121: Disable emails as a feature - Removed unused service argument<commit_after><?php

namespace Oro\Bundle\SidebarBundle\Model;

use Doctrine\Common\Collections\ArrayCollection;
use Oro\Bundle\FeatureToggleBundle\Checker\FeatureChecker;

class WidgetDefinitionRegistry
{
    const SIDEBAR_WIDGET_FEATURE_NAME = 'sidebar_widgets';

    /**
     * @var ArrayCollection
     */
    protected $widgetDefinitions;

    /**
     * @param array $definitions
     */
    public function __construct(array $definitions)
    {
        $this->widgetDefinitions = new ArrayCollection();

        $this->setWidgetDefinitions($definitions);
    }

    /**
     * @param array $definitions
     */
    public function setWidgetDefinitions(array $definitions)
    {
        foreach ($definitions as $name => $definition) {
            $this->widgetDefinitions->set($name, $definition);
        }
    }

    /**
     * @return ArrayCollection
     */
{'fraction_non_alphanumeric': 0.10994213571804314, 'fraction_numerical': 0.0021041557075223566, 'mean_word_length': 2.9707724425887263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '4823059', 'n_tokens_mistral': 532, 'n_tokens_neox': 521, 'n_words': 99}