<commit_before><?php

namespace tlcal\domain;

class LiquidAssets
{
    const UNKNOWN_ICON =<<<START
<KEY>
START;

    const SC2_ICON =<<<START
<KEY>
START;

    const BW_ICON =<<<START
<KEY>
START;

    const HEARTHSTONE_ICON =<<<START
<KEY>
START;

    const DOTA_ICON =<<<START
iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAYAAACQjC21AAAABmJLR0QA/wD/AP+gvaeTAAAACXBI\nWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wkLDx0vqkz3UgAAAstJREFUOMvtlE1r3VUQh5/fzPxv\nbnMTA0ZptZXE3vhSghp1U9oqvhC1xq4UsnClIHQp+DEUl4oLSRcushMrxIVQrZuu1EKs1ciNqUl8\nWShpwRaT+z/j4iYx9voRnM1whjnPvJ05+uDQ2PtIo4VCQiuTr4Am6LkU9yaQpcylNF6M+wWbmflj\ngS1g8fTq6hvsEX041v52K8uRuiQJpOhpts+517bHLiDzj9dWV0f3AiMi3TFK5jcko1t13tEtSaI9\nAXqQkmwAwyl5JmRmk5vEvNLdEWxVFW//WXcnm5WdbQ04rYbTDMMTvLBCnY+trF25XVlPO/Ts2GAf\nMEwyU+XindHBeOrnTuclh9NuebURojXgtAZifKjyNycOHjzgVDc8hUuERH+Gkd9HgIU1JZtrT7af\nnul03kvbnHTLBQ8Ih6qyo8PN5sWhhr8+1HAaEl7y8z6gpHX33qWoGEac+fShwydOLa2tP7+0PGPi\nFbO86gERjFbBrBk0K2OwGQv9JUf+5A4e0NPab2kfnZtqHwc4+V3nTDc3J1254KaeXw+Oi9k+YOU6\nFg5uPWAERMWtJs2fe6D9KMCppbX1Zy8vz3iUV+VcD9Oubx/QXCPbUesw/e4GYSKCQ9Fg/vzU4Xt2\nnKcXl+eU9XH3/NJduOu+/qE4X7gJN51Nr5905zcPcBPhmojKPjn/yNiRnQvPXFq5aOXaE+55w4Oh\n/h56/hIOgnePXVherMkTYbnukUQID7UbVWP+s6nx8d1taI6cdNc+/6+S3TVrDhKPAyxudq50C2+F\nKL3pJxE82NoXH+9A3Xlhp+83iy5PT2yARkpCt+TXSm5BamfZ3uPkn53O/KsUNhJuAzxTHL3ww79e\nd3jIAKyAmR4moSSk9X6DkrADBw0UY/9uoOzPMIJ8uTbuUnJNyhYiVctJvViUByypUvo1MzdqdN26\nZUOmOwtcKskm/8vf+6cbkEzUl0IAAAAASUVORK5CYII=
START;

    const LOL_ICON =<<<START
<KEY>
START;
    const CSGO_ICON =<<<START
<KEY>
START;
    const SMASH_ICON =<<<START
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAr0lEQVR4AYXRs0IEcACA8V9cs223\n9hiHualHCGvmnhtr65myMWfzfPd9fxui0WLKpEFVUhD0/u2zbRWiGFABQt7/PdMHUOdWMwh7j/JU\nGbDrXcv/gGi3oN7r/4Cgd9E+Kmbou9gcNSDaMNPfhaYUA0ZkHpAtX74s/JajzJVNjhkLikG3RUu/\nLlowIQt2Ut5iBahykXTAviKAfuUJD3WgXTTRf+HeqiJJaDBmVFAhAB/6CHB/GRUzdAAAAABJRU5E\nrkJggg==
START;




    private static $fullLabels = [
        'sc2' => 'Star Craft II',
        'brw' => 'Star Craft: Broodwar',
        'sma' => 'Super Smash Brothers',
        'hrt' => 'Hearthstone',
        'dot' => 'Dota 2',
        'lol' => 'League of Legends',
        'csg' => 'Counter Strike: Global Offensive',
        'pfw' => '',
        'qlv' => 'Quake Live',
        'qiv' => 'Quake 4',
        'qiii' => 'Quake III',
        'qii' => 'Quake II',
        'qw' => 'Quake Wars',
        'dbt' => 'Diabotical',
        'doom' => 'DOOM',
        'rfl' => '',
        'ovw' => 'Overwatch',
        'gg' => '',
        'ut' => 'Unreal Tournament',
        'wsw' => 'Warsow',
        'dbmb' => '',
        'xnt' => 'Xonotical',
        'qch' => 'Quake: Champions',
        'cpma' => '',
        'unk' => 'Unknown',
    ];
    private static $labels = [
        'sc2' => 'SC2',
        'brw' => 'SCBW',
        'sma' => 'SmashBros',
        'hrt' => 'Hearthstone',
        'dot' => 'Dota2',
        'lol' => 'LoL',
        'csg' => 'CSGO',
        'all' => 'TL',
        'pfw' => '',
        'qlv' => 'QLive',
        'qiv' => 'Q4',
        'qiii' => 'QIII',
        'qii' => 'QII',
        'qw' => 'QWars',
        'dbt' => 'Dbtical',
        'doom' => 'DOOM',
        'rfl' => '',
        'ovw' => 'Owatch',
        'gg' => '',
        'ut' => 'UT',
        'wsw' => 'Wsow',
        'dbmb' => '',
        'xnt' => 'Xono',
        'qch' => 'QChamp',
        'cpma' => '',
        'unk' => 'Unk',
    ];

    public static function getLabel ($type = 'unk')
    {
        if (!array_key_exists($type, self::$labels)) {
            $type = 'unk';
        }
        return self::$labels[$type];
    }

    public static function getIconString ($type = 'unk')
    {
        switch ($type) {
            case 'sc2':
                $content = self::SC2_ICON;
                break;
            case 'brw':
                $content = self::BW_ICON;
                break;
            case 'hrt':
                $content = self::HEARTHSTONE_ICON;
                break;
            case 'dot':
                $content = self::DOTA_ICON;
                break;
            case 'lol':
                $content = self::LOL_ICON;
                break;
            case 'unk':
            default:
                $content = self::UNKNOWN_ICON;
        }
        return 'data:image/png;base64,' . $content;
    }

    public static function getIconNode ($type = 'unk') {
        $icon = new \DOMNode('img');
        $icon->appendChild(new \DOMAttr('src', self::getIconString($type)));
        return $icon;
    }
}<commit_msg>Using constants for event types<commit_after><?php

namespace tlcal\domain;

class LiquidAssets
{
    const UNKNOWN_ICON =<<<START
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wkLDhU7eY3DEAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAC0lEQVQI12NgAAIAAAUAAeImBZsAAAAASUVORK5CYII=
START;

    const SC2_ICON =<<<START
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADC0lEQVR42n2TSUxTURSGARWB2uG1\nRUBon619LVBooXTkvdJShrYMZaygokIiCw2JikPixjgsTIxTZGFITDSSuHRhCAmJJoAKCgoIAZyF\nQKSasBAXBBccz31iAU18yUnuO/f838357z0R8UZfBH6RIjornmIcHmmqs1WW7rknYewBzMdixIhV\nOQ6Z3tMuTc07g3m/RGNVYT6KaMMAyS5rarzB+42xl4C1OAgMVwWUjtsvVps5haUULN46MBYEAeuX\npTquMAwIhUI8ACM6Vq7UImQxt7AUbGVNgIWtCN5Nm33gq6oH2lYOQqXBjbVxGJuIjgfI0lzllJbt\nkDL2HhFtWkzQWkCRXQRyrf2hSGW5LlaagM5yg0htXaI01j6pxvqcUuec4SE8ID2/rf/VKOA6HNOz\nc5DlrnlXuufw1NTb9xv2BoZfQxob6KN0LMUDcHHowuWby2SzobkFZEkqYMweENLZnTfa7y6//fQZ\nvLVNEJeS84P11s4m6rkX6E8l8YEHCBWZ2ylt7pUHnd0rXxDi8gdBkemEbbR5fHRiij+1JNiEpjo/\nClP0RkGSTkDEmF8zEQF5TG6gq69/EObm50FjKiCA4WdDIysEUNd4BCRabg5rhUTzJ36LU50Vaouv\nNz7d1bVDnz8/NvkGXo5Poonc2Kmzl74TQNejHhAozQvinaa95MbCALymmGRjwePB0XH4MD0DTwaG\nYGLVtGu37iyhD/fbbnfw/72DI9By+twPvLHKNYDaggzvUH5Fw4K7fO/XvEDDz+LqA+D014GENvYL\n6azjImU22Iuq4MT5qyusrzYkUuXo17cQJVRkyPDFGbYlp9kljPOp2pgLmZ4goC/HMF+TkOEGk8sP\nYoadEezQmVGzOQzA5xgO8vblGYXdbNk+sJUT17kTCKhNRIC/vhnkhuI3WCNYp/kHsEWisflU9gBY\nSw8igD1JACpbGRgK6wGH6Sgx8H+ASH761JYStaMSpGmui9hGo5arJu00r85A1EYNOTY6OhyrkK0S\nxuYg400xdhZdLyZgsvdXbcQvv8ZlJFQOltMAAAAASUVORK5CYII=
START;

    const BW_ICON =<<<START
<KEY>
START;

    const HEARTHSTONE_ICON =<<<START
iVBORw0KGgoAAAANSUhEUgAAABEAAAASCAYAAAC<KEY>
START;

    const DOTA_ICON =<<<START
<KEY>
START;

    const LOL_ICON =<<<START
iVBORw0KGgoAAAANSUhEUgAAAB<KEY>
START;
    const CSGO_ICON =<<<START
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ\nbWFnZVJlYWR5ccllPAAAATxJREFUeNpi+P//PwMIYwE8QHwPiC8CMSuyBIp6mAHI+P779yCpKJA0\nEH8BYmmocjYgVu7v75fFMAAGGhoKQFQHVDMIPwHi80B8CYhPAfFOIM4HYh0gVmLA4YVLSAaA8Gsg\nfgvErUgu4QRiDrgBDgIKMIPs0TS/A+J/ULY2RkhhccEMNAOuAHE8KEzOr9/PQIwB1WgGfAJiXgYc\ngAmL2Cc0fg8Qf4Zx7q8/T9AF3WguWAWSnz9/PlxBQEICXgP6oRpXgiyEsqPXr1+PYnFDQQNDgEMA\nVgN2gzQJKCiA2K5QA07hCgO4Af0QJ7JDNcwFOwUithgqxobXACiogCpWQlKyAYj/EBMLckAcCcR3\ngQbeQxK/C8UEDXCBxncZIyMjspoXQKwGxAqEDDACYgEgvoaWbc9As3UhNgMAAgwA87G2Kr3+QKAA\nAAAASUVORK5CYII=
START;
    const SMASH_ICON =<<<START
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAr0lEQVR4AYXRs0IEcACA8V9cs223\n9hiHualHCGvmnhtr65myMWfzfPd9fxui0WLKpEFVUhD0/u2zbRWiGFABQt7/PdMHUOdWMwh7j/JU\nGbDrXcv/gGi3oN7r/4Cgd9E+Kmbou9gcNSDaMNPfhaYUA0ZkHpAtX74s/JajzJVNjhkLikG3RUu/\nLlowIQt2Ut5iBahykXTAviKAfuUJD3WgXTTRf+HeqiJJaDBmVFAhAB/6CHB/GRUzdAAAAABJRU5E\nrkJggg==
START;

    const ALL_ID = 'all';
    const UNK_ID =  'unk';

    const SC2_ID = 'sc2';
    const BRW_ID =  'brw';
    const SMA_ID =  'sma';
    const HRT_ID =  'hrt';
    const DOT_ID =  'dot';
    const LOL_ID =  'lol';
    const CSG_ID =  'csg';
    const PFW_ID =  'pfw';
    const QLV_ID =  'qlv';
    const QIV_ID =  'qiv';
    const QIII_ID ='qiii';
    const QII_ID =  'qii';
    const QW_ID =   'qw';
    const DBT_ID =  'dbt';
    const DOOM_ID = 'doom';
    const RFL_ID =  'rfl';
    const OVW_ID =  'ovw';
    const GG_ID =   'gg';
    const UT_ID =   'ut';
    const WSW_ID =  'wsw';
    const DBMB_ID = 'dbmb';
    const XNT_ID =  'xnt';
    const QCH_ID =  'qch';
    const CPMA_ID = 'cpma';

    private static $fullLabels = [
        self::SC2_ID => 'Star Craft II',
        self::BRW_ID => 'Star Craft: Broodwar',
        self::SMA_ID => 'Super Smash Brothers',
        self::HRT_ID => 'Hearthstone',
        self::DOT_ID => 'Dota 2',
        self::LOL_ID => 'League of Legends',
        self::CSG_ID => 'Counter Strike: Global Offensive',
        self::PFW_ID => '',
        self::QLV_ID => 'Quake Live',
        self::QIV_ID => 'Quake 4',
        self::QIII_ID => 'Quake III',
        self::QII_ID => 'Quake II',
        self::QW_ID => 'Quake Wars',
        self::DBT_ID => 'Diabotical',
        self::DOOM_ID => 'DOOM',
        self::RFL_ID => '',
        self::OVW_ID => 'Overwatch',
        self::GG_ID => '',
        self::UT_ID => 'Unreal Tournament',
        self::WSW_ID => 'Warsow',
        self::DBMB_ID => '',
        self::XNT_ID => 'Xonotical',
        self::QCH_ID => 'Quake: Champions',
        self::CPMA_ID => '',
        self::ALL_ID => 'All',
        self::UNK_ID => 'Unknown',
    ];

    private static $labels = [
        self::SC2_ID => 'SC2',
        self::BRW_ID => 'SCBW',
        self::SMA_ID => 'SmashBros',
        self::HRT_ID => 'Hearthstone',
        self::DOT_ID => 'Dota2',
        self::LOL_ID => 'LoL',
        self::CSG_ID => 'CSGO',
        self::ALL_ID => 'TL',
        self::PFW_ID => '+⏩',
        self::QLV_ID => 'QLive',
        self::QIV_ID => 'Q4',
        self::QIII_ID => 'QIII',
        self::QII_ID => 'QII',
        self::QW_ID => 'QWars',
        self::DBT_ID => 'Dbtical',
        self::DOOM_ID => 'DOOM',
        self::RFL_ID => '',
        self::OVW_ID => 'Owatch',
        self::GG_ID => '',
        self::UT_ID => 'UT',
        self::WSW_ID => 'Wsow',
        self::DBMB_ID => '',
        self::XNT_ID => 'Xono',
        self::QCH_ID => 'QChamp',
        self::CPMA_ID => '',
        self::ALL_ID => 'All',
        self::UNK_ID => 'Unk',
    ];

    /**
     * @param string $type
     * @return bool
     */
    public static function validType($type)
    {
        return array_key_exists($type, self::$labels);
    }

    /**
     * @param string $type
     * @return string
     */
    public static function getLabel ($type = self::UNK_ID)
    {
        if (!array_key_exists($type, self::$labels)) {
            $type = self::UNK_ID;
        }
        return self::$labels[$type];
    }

    /**
     * @param string $type
     * @return string
     */
    public static function getFullLabel ($type = self::UNK_ID)
    {
        if (!array_key_exists($type, self::$fullLabels)) {
            $type = self::UNK_ID;
        }
        return self::$fullLabels[$type];
    }

    public static function getIconString ($type = self::UNK_ID)
    {
        switch ($type) {
            case 'sc2':
                $content = self::SC2_ICON;
                break;
            case 'brw':
                $content = self::BW_ICON;
                break;
            case 'hrt':
                $content = self::HEARTHSTONE_ICON;
                break;
            case 'dot':
                $content = self::DOTA_ICON;
                break;
            case 'lol':
                $content = self::LOL_ICON;
                break;
            case 'unk':
            default:
                $content = self::UNKNOWN_ICON;
        }
        return 'data:image/png;base64,' . $content;
    }

    public static function getIconNode ($type = self::UNK_ID) {
        $icon = new \DOMNode('img');
        $icon->appendChild(new \DOMAttr('src', self::getIconString($type)));
        return $icon;
    }
}
{'fraction_non_alphanumeric': 0.13072975558841438, 'fraction_numerical': 0.0437505436200748, 'mean_word_length': 2.9689333793579564, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '6792301', 'n_tokens_mistral': 5774, 'n_tokens_neox': 5404, 'n_words': 582}