<commit_before><?php
/**
 * @title            Kernel Class
 * @desc             Kernel Class of pH7CMS.
 *
 * @author           <NAME> <<EMAIL>>
 * @copyright        (c) 2011-2017, <NAME>. All Rights Reserved.
 * @license          CC-BY License - http://creativecommons.org/licenses/by/3.0/
 * @link             http://ph7cms.com
 * @package          PH7 / Framework / Core
 * @version          1.3
 */

namespace PH7\Framework\Core;

defined('PH7') or exit('Restricted access');

use PH7\Framework\Config\Config;
use PH7\Framework\Str\Str;
use PH7\Framework\File\File;
use PH7\Framework\Mvc\Request\Http;
use PH7\Framework\Navigation\Browser;
use PH7\Framework\Registry\Registry;
use PH7\Framework\Page\Page;
use PH7\Framework\Security\Version;
use PH7\Framework\Server\Server;

abstract class Kernel
{
    const SOFTWARE_NAME = 'pH7CMS';
    const SOFTWARE_DESCRIPTION = 'pH7CMS Software allows to build next generation Social Dating app/website for your business!';
    const SOFTWARE_WEBSITE = 'http://ph7cms.com';
    const SOFTWARE_LICENSE_KEY_URL = 'https://ph7cms.com/memberships';
    const SOFTWARE_DOC_URL = 'https://ph7cms.com/doc';
    const SOFTWARE_FAQ_URL = 'https://ph7cms.com/faq';
    const SOFTWARE_FORUM_URL = 'https://ph7cms.com/forum';
    const SOFTWARE_EMAIL = '<EMAIL>';
    const SOFTWARE_AUTHOR = '<NAME>';
    const SOFTWARE_COMPANY = 'Social Dating CMS | By <NAME>';
    const SOFTWARE_LICENSE = 'GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.';
    const SOFTWARE_COPYRIGHT = '(c) 2011-2017, <NAME>. All Rights Reserved.';
    const SOFTWARE_VERSION_NAME = Version::KERNEL_VERSION_NAME;
    const SOFTWARE_VERSION = Version::KERNEL_VERSION;
    const SOFTWARE_BUILD = Version::KERNEL_BUILD;
    const SOFTWARE_TECHNOLOGY_NAME = Version::KERNEL_TECHNOLOGY_NAME;
    const SOFTWARE_SERVER_NAME = Version::KERNEL_SERVER_NAME;
    const SOFTWARE_USER_AGENT = 'pH7 Web Simulator/1.1.2'; // USER AGENT NAME of Web Simulator
    const SOFTWARE_CRAWLER_NAME = 'ph7hizupcrawler'; // CRAWLER BOT NAME

    /** @var Config */
    protected $config;

    /** @var Str */
    protected $str;

    /** @var File */
    protected $file;

    /** @var Http */
    protected $httpRequest;

    /** @var Browser */
    protected $browser;

    /** @var Registry */
    protected $registry;

    public function __construct()
    {
        $this->config = Config::getInstance();
        $this->str = new Str;
        $this->file = new File;
        $this->httpRequest = new Http;
        $this->browser = new Browser;
        $this->registry = Registry::getInstance();

        /**
         * @internal The "_checkLicense" method cannot be declare more than one time. The "Kernel.class.php" file is included many times in the software, so we need to check that with a constant.
         */
        if (!defined( 'PH7_CHECKED_LIC' )) {
            define( 'PH7_CHECKED_LIC', 1 ); // OK, now we have checked the license key
            $this->_checkLicense();
        }
    }

    /**
     * Check License key.
     *
     * @return integer Returns '1' if the license key is invalid and stops the script with the exit() function.
     */
    final private function _checkLicense()
    {
        $this->_checkInternetConnection(); // First we check the Internet connection

        $oLicense = new License;
        $aLicData = $oLicense->checkCopyright();
        //define('PH7_SOFTWARE_STATUS', !$oLicense->isBanned());
        define('PH7_SOFTWARE_STATUS', true);
        define('PH7_LICENSE_STATUS', true);
        define('PH7_LICENSE_NAME', (!empty($aLicData['productname']) ? $aLicData['productname'] : 'Trial'));
        define('PH7_VALID_LICENSE', (PH7_LICENSE_STATUS === 'active'));<commit_msg>Wrong value for lic status<commit_after><?php
/**
 * @title            Kernel Class
 * @desc             Kernel Class of pH7CMS.
 *
 * @author           <NAME> <<EMAIL>>
 * @copyright        (c) 2011-2017, <NAME>. All Rights Reserved.
 * @license          CC-BY License - http://creativecommons.org/licenses/by/3.0/
 * @link             http://ph7cms.com
 * @package          PH7 / Framework / Core
 * @version          1.3
 */

namespace PH7\Framework\Core;

defined('PH7') or exit('Restricted access');

use PH7\Framework\Config\Config;
use PH7\Framework\Str\Str;
use PH7\Framework\File\File;
use PH7\Framework\Mvc\Request\Http;
use PH7\Framework\Navigation\Browser;
use PH7\Framework\Registry\Registry;
use PH7\Framework\Page\Page;
use PH7\Framework\Security\Version;
use PH7\Framework\Server\Server;

abstract class Kernel
{
    const SOFTWARE_NAME = 'pH7CMS';
    const SOFTWARE_DESCRIPTION = 'pH7CMS Software allows to build next generation Social Dating app/website for your business!';
    const SOFTWARE_WEBSITE = 'http://ph7cms.com';
    const SOFTWARE_LICENSE_KEY_URL = 'https://ph7cms.com/memberships';
    const SOFTWARE_DOC_URL = 'https://ph7cms.com/doc';
    const SOFTWARE_FAQ_URL = 'https://ph7cms.com/faq';
    const SOFTWARE_FORUM_URL = 'https://ph7cms.com/forum';
    const SOFTWARE_EMAIL = '<EMAIL>';
    const SOFTWARE_AUTHOR = '<NAME>';
    const SOFTWARE_COMPANY = 'Social Dating CMS | By P<NAME>';
    const SOFTWARE_LICENSE = 'GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.';
    const SOFTWARE_COPYRIGHT = '(c) 2011-2017, <NAME>. All Rights Reserved.';
    const SOFTWARE_VERSION_NAME = Version::KERNEL_VERSION_NAME;
    const SOFTWARE_VERSION = Version::KERNEL_VERSION;
    const SOFTWARE_BUILD = Version::KERNEL_BUILD;
    const SOFTWARE_TECHNOLOGY_NAME = Version::KERNEL_TECHNOLOGY_NAME;
    const SOFTWARE_SERVER_NAME = Version::KERNEL_SERVER_NAME;
    const SOFTWARE_USER_AGENT = 'pH7 Web Simulator/1.1.2'; // USER AGENT NAME of Web Simulator
    const SOFTWARE_CRAWLER_NAME = 'ph7hizupcrawler'; // CRAWLER BOT NAME

    /** @var Config */
    protected $config;

    /** @var Str */
    protected $str;

    /** @var File */
    protected $file;

    /** @var Http */
    protected $httpRequest;

    /** @var Browser */
    protected $browser;

    /** @var Registry */
    protected $registry;

    public function __construct()
    {
        $this->config = Config::getInstance();
        $this->str = new Str;
        $this->file = new File;
        $this->httpRequest = new Http;
        $this->browser = new Browser;
        $this->registry = Registry::getInstance();

        /**
         * @internal The "_checkLicense" method cannot be declare more than one time. The "Kernel.class.php" file is included many times in the software, so we need to check that with a constant.
         */
        if (!defined( 'PH7_CHECKED_LIC' )) {
            define( 'PH7_CHECKED_LIC', 1 ); // OK, now we have checked the license key
            $this->_checkLicense();
        }
    }

    /**
     * Check License key.
     *
     * @return integer Returns '1' if the license key is invalid and stops the script with the exit() function.
     */
    final private function _checkLicense()
    {
        $this->_checkInternetConnection(); // First we check the Internet connection

        $oLicense = new License;
        $aLicData = $oLicense->checkCopyright();
        //define('PH7_SOFTWARE_STATUS', !$oLicense->isBanned());
        define('PH7_SOFTWARE_STATUS', true);
        define('PH7_LICENSE_STATUS', 'active');
        define('PH7_LICENSE_NAME', (!empty($aLicData['productname']) ? $aLicData['productname'] : 'Trial'));
        define('PH7_VALID_LICENSE', (PH7_LICENSE_STATUS === 'active'));
{'fraction_non_alphanumeric': 0.1253319171534785, 'fraction_numerical': 0.015400955921402018, 'mean_word_length': 2.971006852925672, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 39, 'https://': 8, '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': '1776770', 'n_tokens_mistral': 2344, 'n_tokens_neox': 2225, 'n_words': 597}