<commit_before><?php
namespace DF\Controller;

use \DF\Url;
use \DF\Flash;

class Action extends \Zend_Controller_Action
{
	public $config;
	public $module_config;
	public $auth;
	public $acl;
	public $test_mode;
	
    public function init()
    {
		$this->config = $this->view->config = \Zend_Registry::get('config');
		$this->module_config = $this->view->module_config = \Zend_Registry::get('module_config');
		$this->auth = $this->view->auth = \Zend_Registry::get('auth');
		$this->acl = $this->view->acl = \Zend_Registry::get('acl');
        $this->em = \Zend_Registry::get('em');
		
		$this->module_name = $this->_getModuleName();
		\Zend_Registry::set('module_name', $this->module_name);
		
		if (isset($this->module_config[$this->module_name]))
			$this->current_module_config = $this->module_config[$this->module_name];
			
		$this->test_mode = $this->isTestMode();
		
		if ($this->test_mode)
		{
			$front = $this->getFrontController();
			$front->setParam('noErrorHandler', true);
		}

        $this->preInit();

		$isAllowed = $this->permissions();
		
		if (!$isAllowed)
		{
			if (!\DF\Auth::isLoggedIn())
				throw new \DF\Exception\NotLoggedIn();
			else
				throw new \DF\Exception\PermissionDenied();
		}

        $this->postInit();
    }

    public function preInit() {}
    public function postInit() {}
	
	protected function _getModuleName()
	{
		$front = $this->getFrontController();  
		$request = $this->getRequest();  <commit_msg>Minor changes to make phpstorm happy.<commit_after><?php
namespace DF\Controller;

use DF\Exception\NotLoggedIn;
use DF\Exception\PermissionDenied;
use DF\Url;
use DF\Flash;

class Action extends \Zend_Controller_Action
{
	public $config;
	public $module_config;
	public $auth;
	public $acl;
	public $test_mode;
    public $em;
    public $module_name;
	
    public function init()
    {
		$this->config = $this->view->config = \Zend_Registry::get('config');
		$this->module_config = $this->view->module_config = \Zend_Registry::get('module_config');
		$this->auth = $this->view->auth = \Zend_Registry::get('auth');
		$this->acl = $this->view->acl = \Zend_Registry::get('acl');
        $this->em = \Zend_Registry::get('em');
		
		$this->module_name = $this->_getModuleName();
		\Zend_Registry::set('module_name', $this->module_name);
		
		if (isset($this->module_config[$this->module_name]))
			$this->current_module_config = $this->module_config[$this->module_name];
			
		$this->test_mode = $this->isTestMode();
		
		if ($this->test_mode)
		{
			$front = $this->getFrontController();
			$front->setParam('noErrorHandler', true);
		}

        $this->preInit();

		$isAllowed = $this->permissions();
		
		if (!$isAllowed)
		{
			if (!\DF\Auth::isLoggedIn())
				throw new NotLoggedIn;
			else
				throw new PermissionDenied;
		}

        $this->postInit();
    }

    public function preInit() {}
    public function postInit() {}
	
	protected function _getModuleName()
	{
		$front = $this->getFrontController();  
		$request = $this->getRequest();  
{'fraction_non_alphanumeric': 0.1780958721704394, 'fraction_numerical': 0.0, 'mean_word_length': 3.9181669394435352, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 65, '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': '1063914', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1008, 'n_words': 177}