<commit_before><?php
/**
 * @title            Controller Core Class
 *
 * @author           <NAME> <<EMAIL>>
 * @copyright        (c) 2012-2017, <NAME>. All Rights Reserved.
 * @license          GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @link             http://ph7cms.com
 * @package          PH7 / Install / Library
 */

namespace PH7;
defined('PH7') or die('Restricted access');

abstract class Controller implements Controllable
{
    const
    SOFTWARE_NAME = 'pH7CMS',
    SOFTWARE_PREFIX_COOKIE_NAME = 'pH7',
    SOFTWARE_WEBSITE = 'http://ph7cms.com',
    SOFTWARE_LICENSE_URL = 'http://ph7cms.com/legal/license',
    SOFTWARE_HELP_URL = 'http://clients.hizup.com/support', // Help Desk URL
    SOFTWARE_LICENSE_KEY_URL = 'http://ph7cms.com/web/buysinglelicense',
    SOFTWARE_DOWNLOAD_URL = 'http://download.hizup.com/',
    SOFTWARE_REQUIREMENTS_URL = 'http://ph7cms.com/doc/en/requirements',
    SOFTWARE_HOSTING_LIST_URL = 'http://ph7cms.com/hosting',
    SOFTWARE_HOSTING_LIST_FR_URL = 'http://ph7cms.com/doc/fr/h%C3%A9bergement-web',
    SOFTWARE_EMAIL = '<EMAIL>',
    SOFTWARE_AUTHOR = '<NAME>',
    SOFTWARE_LICENSE = 'GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.',
    SOFTWARE_COPYRIGHT = '© (c) 2012-2017, <NAME>. All Rights Reserved.',
    // 1.0, 1.1 branches were "pOH", 1.2 was "pOW", 1.3, 1.4 were "p[H]", 2.* was "H2O", 3.* was "H3O", 4.* was "HCO", 5.* was "pCO" and 6.* is "WoW"
    SOFTWARE_VERSION_NAME = 'WoW',
    SOFTWARE_VERSION = '6.0.13',
    SOFTWARE_BUILD = '1',
    DEFAULT_LANG = 'en',
    DEFAULT_THEME = 'base';

    protected $oView, $sCurrentLang;

    public function __construct()
    {
        global $LANG;

        // Initialize PHP session
        $this->initializePHPSession();

        // Verify and correct the time zone if necessary
        $this->checkTimezone();

        // Language initialization
        $this->sCurrentLang = (new Language)->get();
        include_once PH7_ROOT_INSTALL . 'langs/' . $this->sCurrentLang . '/install.lang.php';

        /* Smarty initialization */
        $this->oView = new \Smarty;
        $this->oView->use_sub_dirs = true;
        $this->oView->setTemplateDir(PH7_ROOT_INSTALL . 'views/' . self::DEFAULT_THEME);
        $this->oView->setCompileDir(PH7_ROOT_INSTALL . 'data/caches/smarty_compile');
        $this->oView->setCacheDir(PH7_ROOT_INSTALL  . 'data/caches/smarty_cache');
        $this->oView->setPluginsDir(PH7_ROOT_INSTALL . 'library/Smarty/plugins');
        // Smarty Cache
        $this->oView->caching = 0; // 0 = Cache disabled |  1 = Cache never expires | 2 = Set the cache duration at "cache_lifetime" attribute
        $this->oView->cache_lifetime = 86400; // 86400 seconds = 24h

        $this->oView->assign('LANG', $LANG);<commit_msg>Use "const" keyword for each single line for better readability<commit_after><?php
/**
 * @title            Controller Core Class
 *
 * @author           <NAME> <<EMAIL>>
 * @copyright        (c) 2012-2017, <NAME>. All Rights Reserved.
 * @license          GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @link             http://ph7cms.com
 * @package          PH7 / Install / Library
 */

namespace PH7;
defined('PH7') or die('Restricted access');

abstract class Controller implements Controllable
{
    const SOFTWARE_NAME = 'pH7CMS';
    const DEFAULT_SITE_NAME = 'Social Dating App';
    const SOFTWARE_PREFIX_COOKIE_NAME = 'pH7';
    const SOFTWARE_WEBSITE = 'http://ph7cms.com';
    const SOFTWARE_LICENSE_URL = 'http://ph7cms.com/legal/license';
    const SOFTWARE_HELP_URL = 'http://clients.hizup.com/support'; // Help Desk URL
    const SOFTWARE_LICENSE_KEY_URL = 'http://ph7cms.com/web/buysinglelicense';
    const SOFTWARE_DOWNLOAD_URL = 'http://download.hizup.com/';
    const SOFTWARE_REQUIREMENTS_URL = 'http://ph7cms.com/doc/en/requirements';
    const SOFTWARE_HOSTING_LIST_URL = 'http://ph7cms.com/hosting';
    const SOFTWARE_HOSTING_LIST_FR_URL = 'http://ph7cms.com/doc/fr/h%C3%A9bergement-web';
    const SOFTWARE_EMAIL = '<EMAIL>';
    const SOFTWARE_AUTHOR = '<NAME>';
    const SOFTWARE_LICENSE = 'GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.';
    const SOFTWARE_COPYRIGHT = '© (c) 2012-2017, <NAME>. All Rights Reserved.';

    // 1.0, 1.1 branches were "pOH", 1.2 was "pOW", 1.3, 1.4 were "p[H]", 2.* was "H2O", 3.* was "H3O", 4.* was "HCO", 5.* was "pCO" and 6.* is "WoW"
    const SOFTWARE_VERSION_NAME = 'WoW';
    const SOFTWARE_VERSION = '6.0.13';
    const SOFTWARE_BUILD = '1';
    const DEFAULT_LANG = 'en';
    const DEFAULT_THEME = 'base';

    protected $oView, $sCurrentLang;

    public function __construct()
    {
        global $LANG;

        // Initialize PHP session
        $this->initializePHPSession();

        // Verify and correct the time zone if necessary
        $this->checkTimezone();

        // Language initialization
        $this->sCurrentLang = (new Language)->get();
        include_once PH7_ROOT_INSTALL . 'langs/' . $this->sCurrentLang . '/install.lang.php';

        /* Smarty initialization */
        $this->oView = new \Smarty;
        $this->oView->use_sub_dirs = true;
        $this->oView->setTemplateDir(PH7_ROOT_INSTALL . 'views/' . self::DEFAULT_THEME);
        $this->oView->setCompileDir(PH7_ROOT_INSTALL . 'data/caches/smarty_compile');
        $this->oView->setCacheDir(PH7_ROOT_INSTALL  . 'data/caches/smarty_cache');
        $this->oView->setPluginsDir(PH7_ROOT_INSTALL . 'library/Smarty/plugins');
        // Smarty Cache
        $this->oView->caching = 0; // 0 = Cache disabled |  1 = Cache never expires | 2 = Set the cache duration at "cache_lifetime" attribute
        $this->oView->cache_lifetime = 86400; // 86400 seconds = 24h

        $this->oView->assign('LANG', $LANG);
{'fraction_non_alphanumeric': 0.14174560216508797, 'fraction_numerical': 0.026048714479025712, 'mean_word_length': 2.981818181818182, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '393856', 'n_tokens_mistral': 2049, 'n_tokens_neox': 1931, 'n_words': 441}