<commit_before><?php
/*
 * WellCommerce Open-Source E-Commerce Platform
 *
 * This file is part of the WellCommerce package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information,
 * please view the LICENSE file that was distributed with this source code.
 */
namespace WellCommerce\Bundle\LocaleBundle\Twig\Extension;

use Symfony\Component\HttpFoundation\Session\SessionInterface;
use WellCommerce\Component\DataSet\DataSetInterface;

/**
 * Class LocaleExtension
 *
 * @author  <NAME> <<EMAIL>>
 */
class LocaleExtension extends \Twig_Extension
{
    /**
     * @var SessionInterface
     */
    protected $session;

    /**
     * @var DataSetInterface
     */
    protected $dataset;

    /**
     * Constructor
     *
     * @param SessionInterface $session
     */
    /**
     * Constructor
     *
     * @param SessionInterface $session
     * @param DataSetInterface $dataset
     */
    public function __construct(SessionInterface $session, DataSetInterface $dataset)
    {
        $this->session = $session;
        $this->dataset = $dataset;
    }

    /**
     * {@inheritdoc}
     */
    public function getGlobals()
    {
        return [
            'locales' => $this->dataset->getResult('select')
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'locale';
    }
}
<commit_msg>Fixed deprecation warnings for 2.8/3.0<commit_after><?php
/*
 * WellCommerce Open-Source E-Commerce Platform
 *
 * This file is part of the WellCommerce package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information,
 * please view the LICENSE file that was distributed with this source code.
 */
namespace WellCommerce\Bundle\LocaleBundle\Twig\Extension;

use Symfony\Component\HttpFoundation\Session\SessionInterface;
use WellCommerce\Component\DataSet\DataSetInterface;

/**
 * Class LocaleExtension
 *
 * @author  <NAME> <<EMAIL>>
 */
class LocaleExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface
{
    /**
     * @var SessionInterface
     */
    protected $session;

    /**
     * @var DataSetInterface
     */
    protected $dataset;

    /**
     * Constructor
     *
     * @param SessionInterface $session
     */
    /**
     * Constructor
     *
     * @param SessionInterface $session
     * @param DataSetInterface $dataset
     */
    public function __construct(SessionInterface $session, DataSetInterface $dataset)
    {
        $this->session = $session;
        $this->dataset = $dataset;
    }

    /**
     * {@inheritdoc}
     */
    public function getGlobals()
    {
        return [
            'locales' => $this->dataset->getResult('select')
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'locale';
    }
}

{'fraction_non_alphanumeric': 0.11956137247966042, 'fraction_numerical': 0.0014149274849663955, 'mean_word_length': 2.452991452991453, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 25, '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': '6940001', 'n_tokens_mistral': 815, 'n_tokens_neox': 810, 'n_words': 190}