<commit_before><?php
/**
 * @title          Avatar Design Core Class
 *
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2019, <NAME>. All Rights Reserved.
 * @license        MIT License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Class / Design
 */

namespace PH7;

use PH7\Framework\Layout\Html\Design;
use PH7\Framework\Registry\Registry;
use PH7\Framework\Server\Server;
use PH7\Framework\Service\SearchImage\Google as GoogleImage;
use PH7\Framework\Service\SearchImage\InvalidUrlException;
use PH7\Framework\Service\SearchImage\Url as ImageUrl;

class AvatarDesignCore extends Design
{
    const DEF_AVATAR_SIZE = 32;
    const DEF_LIGHTBOX_AVATAR_SIZE = 400;

    /** @var UserCore */
    private $oUser;

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

        $this->oUser = new UserCore;
    }

    /**
     * Display image avatar.
     *
     * @param string $sUsername
     * @param string $sFirstName
     * @param string $sSex
     * @param int $iSize Avatar size (available sizes: 32, 64, 100, 150, 200, 400)
     * @param bool $bRollover CSS effect
     *
     * @return void
     */
    public function get($sUsername = '', $sFirstName = '', $sSex = null, $iSize = self::DEF_AVATAR_SIZE, $bRollover = false)
    {
        if ($sUsername === PH7_ADMIN_USERNAME) {
            [$sUsername, $sFirstName, $sSex] = $this->getAdminAvatarDetails();
        }

        // The profile does not exist, so it creates a fake profile = ghost<commit_msg>PHP 7.4; Strict type declarations on properties<commit_after><?php
/**
 * @title          Avatar Design Core Class
 *
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2019, <NAME>. All Rights Reserved.
 * @license        MIT License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Class / Design
 */

declare(strict_types=1);

namespace PH7;

use PH7\Framework\Layout\Html\Design;
use PH7\Framework\Registry\Registry;
use PH7\Framework\Server\Server;
use PH7\Framework\Service\SearchImage\Google as GoogleImage;
use PH7\Framework\Service\SearchImage\InvalidUrlException;
use PH7\Framework\Service\SearchImage\Url as ImageUrl;

class AvatarDesignCore extends Design
{
    const DEF_AVATAR_SIZE = 32;
    const DEF_LIGHTBOX_AVATAR_SIZE = 400;

    private UserCore $oUser;

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

        $this->oUser = new UserCore;
    }

    /**
     * Display image avatar.
     *
     * @param string $sUsername
     * @param string $sFirstName
     * @param string $sSex
     * @param int $iSize Avatar size (available sizes: 32, 64, 100, 150, 200, 400)
     * @param bool $bRollover CSS effect
     *
     * @return void
     */
    public function get($sUsername = '', $sFirstName = '', $sSex = null, $iSize = self::DEF_AVATAR_SIZE, $bRollover = false)
    {
        if ($sUsername === PH7_ADMIN_USERNAME) {
            [$sUsername, $sFirstName, $sSex] = $this->getAdminAvatarDetails();
        }

        // The profile does not exist, so it creates a fake profile = ghost
{'fraction_non_alphanumeric': 0.11664564943253468, 'fraction_numerical': 0.026166456494325346, 'mean_word_length': 2.790919952210275, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '256207', 'n_tokens_mistral': 1068, 'n_tokens_neox': 980, 'n_words': 273}