<commit_before><?php

namespace pmdc\views;

use pmdc\Main;

class ContestInfoPageView {
    private $main;

    public function __construct(Main $main) {
        $this->main = $main;
    }
    
    public function getTitle(): string {
        return "Contest // PocketMine Development Contest";
    }
    
    public function init(int $id) {
        require_once INSTALL_PATH . "/includes/header.php";
        
        $contest = Main::getInstance()->getContestManager()->getContest($id);
        if($contest === null) {
            echo "unknown contest";
            return;
        }
        ?>
        <div class="jumbotron jumbotron-fluid mb-xl">
            <div class="container">
                <h1> <?= $contest->getName() ?> </h1>
            </div>
        </div>
        <div class="container">
            <div class="card">
                <div class="card-block"><commit_msg>Show contest name as page title<commit_after><?php

namespace pmdc\views;

use pmdc\Main;

class ContestInfoPageView {
    private $main;
    private $contestName;

    public function __construct(Main $main) {
        $this->main = $main;
    }
    
    public function getTitle(): string {
        return $this->contestName . " // PocketMine Development Contest";
    }
    
    public function init(int $id) {  
        $contest = Main::getInstance()->getContestManager()->getContest($id);
        if($contest === null) {
            echo "unknown contest";
            return;
        }
        
        $this->contentName = $contest->getName();
        
        require_once INSTALL_PATH . "/includes/header.php";
        ?>
        <div class="jumbotron jumbotron-fluid mb-xl">
            <div class="container">
                <h1> <?= $contest->getName() ?> </h1>
            </div>
        </div>
        <div class="container">
            <div class="card">
                <div class="card-block">
{'fraction_non_alphanumeric': 0.13767735155018393, 'fraction_numerical': 0.0021019442984760903, 'mean_word_length': 1.9024390243902438, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4317879', 'n_tokens_mistral': 563, 'n_tokens_neox': 552, 'n_words': 120}