<commit_before><?php
/**
 * Created by PhpStorm.
 * User: Adrien
 * Date: 11/10/2014
 * Time: 09:45
 */

if($argv[1] == 'generate')
{
    if($argv[2] == 'controller' && isset($argv[3]))
    {
        $file = fopen("controllers/{$argv[3]}.php", 'w') or die("Impossible de generer le fichier");
        fwrite($file, "<?php\n\nclass {$argv[3]} extends \Core\Controller\n{\n\t\n}");
    }
    else if($argv[2] == 'model' && isset($argv[3]))
    {
        $file = fopen("models/{$argv[3]}.php", 'w') or die("Impossible de generer le fichier");
        fwrite($file, "<?php\n\nclass {$argv[3]} extends \Core\Model\n{\n\t\n}");
    }
    else
    {
        echo 'Les arguments entrés ne sont pas corrects';
    }
}<commit_msg>add constructor when generating<commit_after><?php
/**
 * Created by PhpStorm.
 * User: Adrien
 * Date: 11/10/2014
 * Time: 09:45
 */

if($argv[1] == 'generate')
{
    if($argv[2] == 'controller' && isset($argv[3]))
    {
        $file = fopen("controllers/{$argv[3]}.php", 'w') or die("Impossible de generer le fichier");
        fwrite($file, "<?php\n\nclass {$argv[3]} extends \Core\Controller\n{\n\tpublic function __construct()\n\t{\n\t\tparent::__construct();\n\t}\n}");
    }
    else if($argv[2] == 'model' && isset($argv[3]))
    {
        $file = fopen("models/{$argv[3]}.php", 'w') or die("Impossible de generer le fichier");
        fwrite($file, "<?php\n\nclass {$argv[3]} extends \Core\Model\n{\n\t\n}");
    }
    else
    {
        echo 'Les arguments entrés ne sont pas corrects';
    }
}
{'fraction_non_alphanumeric': 0.2242622950819672, 'fraction_numerical': 0.02754098360655738, 'mean_word_length': 3.0263852242744065, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '2910126', 'n_tokens_mistral': 592, 'n_tokens_neox': 578, 'n_words': 117}