<commit_before><?php

namespace Etu\Core\CoreBundle\Framework\Listener;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;

class TerminateListener
{
	/**
	 * @var Session
	 */
	protected $session;

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

	/**
	 * @param PostResponseEvent $event
	 */
	public function onKernelTerminate(PostResponseEvent $event)
	{
		$this->session->set('etu.last_url', $event->getRequest()->getRequestUri());
	}<commit_msg>Minor bug fix in developpment environnement<commit_after><?php

namespace Etu\Core\CoreBundle\Framework\Listener;

use Etu\Core\CoreBundle\Framework\EtuKernel;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;

class TerminateListener
{
	/**
	 * @var Session
	 */
	protected $session;

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

	/**
	 * @param PostResponseEvent $event
	 */
	public function onKernelTerminate(PostResponseEvent $event)
	{
		if (substr($event->getRequest()->get('_controller'), 0, 3) != 'Etu') {
			return;
		}

		$this->session->set('etu.last_url', $event->getRequest()->getRequestUri());
	}
{'fraction_non_alphanumeric': 0.1425561797752809, 'fraction_numerical': 0.0014044943820224719, 'mean_word_length': 4.912863070539419, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '4739990', 'n_tokens_mistral': 468, 'n_tokens_neox': 443, 'n_words': 79}