<commit_before>$(document).ready(function(){
    $("#form-model-writer").on('submit', function(e){
        e.preventDefault();
        $.ajax({
            url: 'model-writer-ajax.php', 
            method: 'post',
            data: $("#form-model-writer").serialize(),
            success: function(result){
                $("#result").html(result);
            }
        });
    });
    
    $("#btn-add-model-property").on('click', function(){
        var ele = $(".args").first().clone();
        $(".args-container").append(ele);
    });
    $("#language").on("change", function() {
        switch ($(this).val()) {
            case "php":
                ModelWriter.defaultPropertyTypes = 
                    ["int","bool","number","string","array","object"];
            break;
        }
    }).trigger("change");
    $("#types").on("change", function () {
        $("input#add-type").val($(this).val());
    });
    $("#form-model-writer").on("change", "select[name='arg_type[]']", function () {
        if ($(this).val() != "") return;
        if ($(".args").length > 1){
            $(this).parent().remove();
        } else {
            modal_errors('You must have at least one model property!');
        }
    });
    ModelWriter.populatePropertyTypes();
});
var ModelWriter = {};
function remove_model_property(ele){
    if ($(".args").length > 1){
        ele.remove();
    } else {
        modal_errors('You must have at least one model property!');
    }
}

ModelWriter.defaultPropertyTypes = ["int"
                                   ,"bool"
                                   ,"number"
                                   ,"string"
                                   ,"array"
                                   ,"object"];
                                   
ModelWriter.customPropertyTypes = [];

ModelWriter.addPropertyType = function() {
    var cTypes = ModelWriter.customPropertyTypes;
    var dTypes = ModelWriter.defaultPropertyTypes;
    var name = $("input#add-type").val();
    if (cTypes.indexOf(name) != -1 || dTypes.indexOf(name) != -1) {
        modal_errors("This property type already exists!");
        return;<commit_msg>Changed default php property types<commit_after>$(document).ready(function(){
    $("#form-model-writer").on('submit', function(e){
        e.preventDefault();
        $.ajax({
            url: 'model-writer-ajax.php', 
            method: 'post',
            data: $("#form-model-writer").serialize(),
            success: function(result){
                $("#result").html(result);
            }
        });
    });
    
    $("#btn-add-model-property").on('click', function(){
        var ele = $(".args").first().clone();
        $(".args-container").append(ele);
    });
    $("#language").on("change", function() {
        switch ($(this).val()) {
            case "php":
                ModelWriter.defaultPropertyTypes = 
                    ["bool"
                    ,"boolean"
                    ,"int"
                    ,"float"
                    ,"double"
                    ,"long"
                    ,"string"
                    ,"array"
                    ,"object"];
            break;
        }
    }).trigger("change");
    $("#types").on("change", function () {
        $("input#add-type").val($(this).val());
    });
    $("#form-model-writer").on("change", "select[name='arg_type[]']", function () {
        if ($(this).val() != "") return;
        if ($(".args").length > 1){
            $(this).parent().remove();
        } else {
            modal_errors('You must have at least one model property!');
        }
    });
    ModelWriter.populatePropertyTypes();
});
var ModelWriter = {};
function remove_model_property(ele){
    if ($(".args").length > 1){
        ele.remove();
    } else {
        modal_errors('You must have at least one model property!');
    }
}

ModelWriter.defaultPropertyTypes = ["bool"
                                   ,"boolean"
                                   ,"int"
                                   ,"float"
                                   ,"double"
                                   ,"long"
                                   ,"string"
                                   ,"array"
                                   ,"object"];
                                   
ModelWriter.customPropertyTypes = [];

ModelWriter.addPropertyType = function() {
    var cTypes = ModelWriter.customPropertyTypes;
    var dTypes = ModelWriter.defaultPropertyTypes;
    var name = $("input#add-type").val();
    if (cTypes.indexOf(name) != -1 || dTypes.indexOf(name) != -1) {
        modal_errors("This property type already exists!");
        return;
{'fraction_non_alphanumeric': 0.17613027640882795, 'fraction_numerical': 0.0017141632740518534, 'mean_word_length': 1.5522143247676325, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6683396', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1171, 'n_words': 214}