<commit_before><?php

/*
 * This file is part of the Integrated package.
 *
 * (c) e-Active B.V. <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Integrated\Bundle\AssetBundle\Twig\Extension;

use Integrated\Bundle\AssetBundle\Manager\AssetManager;
use Integrated\Bundle\AssetBundle\Twig\TokenParser\AssetTokenParser;

use Doctrine\Common\Inflector\Inflector;

/**
 * @author <NAME> <<EMAIL>>
 */
abstract class AbstractAssetExtension extends \Twig_Extension
{
    /**
     * @var AssetManager
     */
    protected $manager;

    /**
     * @param AssetManager $manager
     */
    public function __construct(AssetManager $manager)
    {
        $this->manager = $manager;
    }

    /**
     * {@inheritdoc}
     */
    public function getTokenParsers()
    {
        return [
            new AssetTokenParser($this->getTag()),
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function getFunctions()
    {
        return [
            new \Twig_SimpleFunction('render', [$this, 'render'], ['is_safe' => ['html'], 'needs_environment' => true]),
        ];
    }

    /**
     * @param \Twig_Environment $environment
     * @return string
     */
    public function render(\Twig_Environment $environment)
    {
        /** @var \Twig_Template $template */
        $template = $environment->loadTemplate($this->getTemplate());

        $html = [];<commit_msg>fix function name<commit_after><?php

/*
 * This file is part of the Integrated package.
 *
 * (c) e-Active B.V. <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Integrated\Bundle\AssetBundle\Twig\Extension;

use Integrated\Bundle\AssetBundle\Manager\AssetManager;
use Integrated\Bundle\AssetBundle\Twig\TokenParser\AssetTokenParser;

use Doctrine\Common\Inflector\Inflector;

/**
 * @author <NAME> <<EMAIL>>
 */
abstract class AbstractAssetExtension extends \Twig_Extension
{
    /**
     * @var AssetManager
     */
    protected $manager;

    /**
     * @param AssetManager $manager
     */
    public function __construct(AssetManager $manager)
    {
        $this->manager = $manager;
    }

    /**
     * {@inheritdoc}
     */
    public function getTokenParsers()
    {
        return [
            new AssetTokenParser($this->getTag()),
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function getFunctions()
    {
        return [
            new \Twig_SimpleFunction($this->getTag(), [$this, 'render'], ['is_safe' => ['html'], 'needs_environment' => true]),
        ];
    }

    /**
     * @param \Twig_Environment $environment
     * @return string
     */
    public function render(\Twig_Environment $environment)
    {
        /** @var \Twig_Template $template */
        $template = $environment->loadTemplate($this->getTemplate());

        $html = [];
{'fraction_non_alphanumeric': 0.13595166163141995, 'fraction_numerical': 0.0, 'mean_word_length': 2.5476190476190474, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 26, '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': '6527918', 'n_tokens_mistral': 864, 'n_tokens_neox': 841, 'n_words': 194}