<commit_before><?php

import_lib('core/session');
import_lib('external/simple-php-captcha/simple-php-captcha');

class Form {
    private $id;
    private $class;
    private $elements;
    private $received;
    private $clear;
    private $data;

    function __construct($id = 'form', $class = null) {
        $this->elements = array();
        $this->id = $id;
        $this->class = $class;
        $this->data = array();
        $this->clear = false;
        if ($_POST['_form_id'] == $id)
            $this->received = true;
        else
            $this->received = false;
    }

    function show($type = 'default') {
        section('forms/' . $type, $this);
    }

    function getId() {
        return $this->id;
    }

    function getClass() {
        return $this->class;
    }

    function setData($data) {
        $this->data = $data;
    }

    function setClear($clear) {
        $this->clear = $clear;
    }

    function received() {
        return $this->received;
    }

    function getElements() {
        return $this->elements;
    }

    private function finishForm() {
        return '<input type="hidden" name="_form_id" value="' . $this->id . '" /></form>';
    }

    private function tableLess($type) {
        return $type == 'hidden' || $type == 'submit';
    }

    private function createInput($name, $title, $type, $attributes) {
        if (!$this->tableLess($type) && (!isset($attributes['class']) || empty($attributes['class'])))
            $attributes['class'] = 'normal';<commit_msg>Removed unused method<commit_after><?php

import_lib('core/session');
import_lib('external/simple-php-captcha/simple-php-captcha');

class Form {
    private $id;
    private $class;
    private $elements;
    private $received;
    private $clear;
    private $data;

    function __construct($id = 'form', $class = null) {
        $this->elements = array();
        $this->id = $id;
        $this->class = $class;
        $this->data = array();
        $this->clear = false;
        if ($_POST['_form_id'] == $id)
            $this->received = true;
        else
            $this->received = false;
    }

    function show($type = 'default') {
        section('forms/' . $type, $this);
    }

    function getId() {
        return $this->id;
    }

    function getClass() {
        return $this->class;
    }

    function setData($data) {
        $this->data = $data;
    }

    function setClear($clear) {
        $this->clear = $clear;
    }

    function received() {
        return $this->received;
    }

    function getElements() {
        return $this->elements;
    }

    private function tableLess($type) {
        return $type == 'hidden' || $type == 'submit';
    }

    private function createInput($name, $title, $type, $attributes) {
        if (!$this->tableLess($type) && (!isset($attributes['class']) || empty($attributes['class'])))
            $attributes['class'] = 'normal';
{'fraction_non_alphanumeric': 0.1708731241473397, 'fraction_numerical': 0.0, 'mean_word_length': 2.2734375, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 34, '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': '6044828', 'n_tokens_mistral': 903, 'n_tokens_neox': 871, 'n_words': 191}