<commit_before><?php

/*
 * This file is part of the CMS Kernel package.
 *
 * Copyright (c) 2016-present LIN3S <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace LIN3S\CMSKernel\Infrastructure\Symfony\Bundle\Twig;

use LIN3S\CMSKernel\Application\Query\Menu\MenuOfCodeHandler;
use LIN3S\CMSKernel\Application\Query\Menu\MenuOfCodeQuery;
use Symfony\Component\HttpFoundation\RequestStack;

/**
 * @author <NAME> <<EMAIL>>
 */
class MenuRendererFunction extends \Twig_Extension
{
    private $requestStack;
    private $menuOfCodeHandler;

    public function __construct(RequestStack $requestStack, MenuOfCodeHandler $menuOfCodeHandler)
    {
        $this->requestStack = $requestStack;
        $this->menuOfCodeHandler = $menuOfCodeHandler;
    }

    public function getFunctions()
    {
        return [
            new \Twig_SimpleFunction('lin3sCmsMenu', [$this, 'menu']),<commit_msg>Fixed name of the Twig function<commit_after><?php

/*
 * This file is part of the CMS Kernel package.
 *
 * Copyright (c) 2016-present LIN3S <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace LIN3S\CMSKernel\Infrastructure\Symfony\Bundle\Twig;

use LIN3S\CMSKernel\Application\Query\Menu\MenuOfCodeHandler;
use LIN3S\CMSKernel\Application\Query\Menu\MenuOfCodeQuery;
use Symfony\Component\HttpFoundation\RequestStack;

/**
 * @author <NAME> <<EMAIL>>
 */
class MenuRendererFunction extends \Twig_Extension
{
    private $requestStack;
    private $menuOfCodeHandler;

    public function __construct(RequestStack $requestStack, MenuOfCodeHandler $menuOfCodeHandler)
    {
        $this->requestStack = $requestStack;
        $this->menuOfCodeHandler = $menuOfCodeHandler;
    }

    public function getFunctions()
    {
        return [
            new \Twig_SimpleFunction('lin3s_cms_menu', [$this, 'menu']),
{'fraction_non_alphanumeric': 0.10159362549800798, 'fraction_numerical': 0.008964143426294821, 'mean_word_length': 4.047738693467337, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, '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': '1568795', 'n_tokens_mistral': 613, 'n_tokens_neox': 583, 'n_words': 146}