<commit_before><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2019, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Module / Game / Controller
 */

namespace PH7;

use PH7\Framework\Http\Http;
use PH7\Framework\Mvc\Model\Statistic as StatModel;
use PH7\Framework\Mvc\Router\Uri;
use PH7\Framework\Navigation\Page;
use stdClass;
use Teapot\StatusCode;

class MainController extends Controller
{
    use ImageTaggable;

    const GAMES_PER_PAGE = 10;
    const CATEGORIES_PER_PAGE = 10;
    const ITEMS_MENU_TOP_VIEWS = 5;
    const ITEMS_MENU_TOP_RATING = 5;
    const ITEMS_MENU_LATEST = 5;
    const ITEMS_MENU_CATEGORIES = 10;

    const MAX_CATEGORY_LENGTH_SHOWN = 60;
    const MAX_TITLE_LENGTH_SHOWN = 100;

    /**
     * @internal Protected access because AdminController derived class uses these attributes
     */
    /** @var stdClass */
    protected $oGameModel;

    /** @var Page */
    protected $oPage;

    /** @var string */
    protected $sTitle;

    /** @var string */
    protected $sMetaKeywords;

    /** @var int */
    protected $iTotalGames;

    public function __construct()
    {
        parent::__construct();

        $this->oGameModel = new GameModel;
        $this->oPage = new Page;

        $this->sMetaKeywords = t('game,free,flash,game site,flash game,games,gaming,online game'); // Predefined meta_keywords tags
        $this->view->meta_keywords = $this->sMetaKeywords;
    }

    public function index()
    {
        $this->view->total_pages = $this->oPage->getTotalPages(
            $this->oGameModel->totalGames(),
            self::GAMES_PER_PAGE
        );
        $this->view->current_page = $this->oPage->getCurrentPage();
        $oGames = $this->oGameModel->get(
            null,<commit_msg>[READABILITY] Update comment<commit_after><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2019, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Module / Game / Controller
 */

namespace PH7;

use PH7\Framework\Http\Http;
use PH7\Framework\Mvc\Model\Statistic as StatModel;
use PH7\Framework\Mvc\Router\Uri;
use PH7\Framework\Navigation\Page;
use stdClass;
use Teapot\StatusCode;

class MainController extends Controller
{
    use ImageTaggable;

    const GAMES_PER_PAGE = 10;
    const CATEGORIES_PER_PAGE = 10;
    const ITEMS_MENU_TOP_VIEWS = 5;
    const ITEMS_MENU_TOP_RATING = 5;
    const ITEMS_MENU_LATEST = 5;
    const ITEMS_MENU_CATEGORIES = 10;

    const MAX_CATEGORY_LENGTH_SHOWN = 60;
    const MAX_TITLE_LENGTH_SHOWN = 100;

    /**
     * @internal Protected access because AdminController derived class uses these attributes
     */
    /** @var stdClass */
    protected $oGameModel;

    /** @var Page */
    protected $oPage;

    /** @var string */
    protected $sTitle;

    /** @var string */
    protected $sMetaKeywords;

    /** @var int */
    protected $iTotalGames;

    public function __construct()
    {
        parent::__construct();

        $this->oGameModel = new GameModel;
        $this->oPage = new Page;

        // Predefined meta keyword tags
        $this->sMetaKeywords = t('game,free,flash,game site,flash game,games,gaming,online game');
        $this->view->meta_keywords = $this->sMetaKeywords;
    }

    public function index()
    {
        $this->view->total_pages = $this->oPage->getTotalPages(
            $this->oGameModel->totalGames(),
            self::GAMES_PER_PAGE
        );
        $this->view->current_page = $this->oPage->getCurrentPage();
        $oGames = $this->oGameModel->get(
            null,
{'fraction_non_alphanumeric': 0.11912225705329153, 'fraction_numerical': 0.01567398119122257, 'mean_word_length': 2.71747572815534, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 47, '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': '3750284', 'n_tokens_mistral': 1306, 'n_tokens_neox': 1223, 'n_words': 280}