<commit_before><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2013-2022, <NAME>. All Rights Reserved.
 * @license        MIT License; See LICENSE.md and COPYRIGHT.md in the root directory.
 * @package        PH7 / App / System / Module / Birthday / Controller
 */

namespace PH7;

use PH7\Framework\Navigation\Page;

class UserController extends Controller
{
    private const MAX_PROFILES_PER_PAGE = 20;

    private BirthdayModel $oBirthModel;

    private Page $oPage;

    private string $sCurrentDate;

    private int $iTotalBirths = 0;

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

        $this->oBirthModel = new BirthdayModel;
        $this->oPage = new Page;

        $this->sCurrentDate = $this->dateTime->get()->date();
        $this->view->avatarDesign = new AvatarDesignCore; // Avatar Design Class

        /**
         *  Predefined meta_description.
         */
        $this->view->meta_description = t("Users' Birthdays %0%", $this->sCurrentDate);

        /**
         *  Predefined meta_keywords tags.
         */
        $this->view->meta_keywords = t('birthday,birthdate,anniversary,birth,friend,dating,social networking,profile,social');
    }

    /**
     * @param string $sGender
     *
     * @return void
     */
    public function index($sGender = BirthdayModel::ALL)
    {
        $this->checkType($sGender);

        $this->view->total_pages = $this->oPage->getTotalPages(
            $this->iTotalBirths, self::MAX_PROFILES_PER_PAGE
        );
        $this->view->current_page = $this->oPage->getCurrentPage();

        $this->iTotalBirths = $this->oBirthModel->get(
            $sGender,
            true,
            SearchCoreModel::LAST_ACTIVITY,<commit_msg>Add  return type for index controller's action<commit_after><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2013-2022, <NAME>. All Rights Reserved.
 * @license        MIT License; See LICENSE.md and COPYRIGHT.md in the root directory.
 * @package        PH7 / App / System / Module / Birthday / Controller
 */

namespace PH7;

use PH7\Framework\Navigation\Page;

class UserController extends Controller
{
    private const MAX_PROFILES_PER_PAGE = 20;

    private BirthdayModel $oBirthModel;

    private Page $oPage;

    private string $sCurrentDate;

    private int $iTotalBirths = 0;

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

        $this->oBirthModel = new BirthdayModel;
        $this->oPage = new Page;

        $this->sCurrentDate = $this->dateTime->get()->date();
        $this->view->avatarDesign = new AvatarDesignCore; // Avatar Design Class

        /**
         *  Predefined meta_description.
         */
        $this->view->meta_description = t("Users' Birthdays %0%", $this->sCurrentDate);

        /**
         *  Predefined meta_keywords tags.
         */
        $this->view->meta_keywords = t('birthday,birthdate,anniversary,birth,friend,dating,social networking,profile,social');
    }

    public function index(string $sGender = BirthdayModel::ALL): void
    {
        $this->checkType($sGender);

        $this->view->total_pages = $this->oPage->getTotalPages(
            $this->iTotalBirths, self::MAX_PROFILES_PER_PAGE
        );
        $this->view->current_page = $this->oPage->getCurrentPage();

        $this->iTotalBirths = $this->oBirthModel->get(
            $sGender,
            true,
            SearchCoreModel::LAST_ACTIVITY,
{'fraction_non_alphanumeric': 0.1289299105855206, 'fraction_numerical': 0.008653014133256417, 'mean_word_length': 2.5172413793103448, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 63, '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': '2370984', 'n_tokens_mistral': 1076, 'n_tokens_neox': 1023, 'n_words': 214}