<commit_before><?php
namespace Ferme;

abstract class Mail
{
    abstract protected function getTemplate();
    abstract protected function getData();

    public function __construct($ferme)
    {
        $this->ferme = $ferme;
    }

    public function send()
    {
        $themePath = 'themes/' . $this->ferme->config['template'] . '/mails/';
        $twigLoader = new \Twig_Loader_Filesystem($themePath);
        $twig = new \Twig_Environment($twigLoader);
        $data = $this->getData();
        $content = $twig->render($this->getTemplate(), $data);

        // DEBUG
        print("<pre>");
        print_r($content);
        print("</pre>");

        mail(
            $data['to'],
            $data['subject'],
            $content,
            "From:" . $data['from']
        );
    }
}
<commit_msg>Supprime un affichage de debug oublié<commit_after><?php
namespace Ferme;

abstract class Mail
{
    abstract protected function getTemplate();
    abstract protected function getData();

    public function __construct($ferme)
    {
        $this->ferme = $ferme;
    }

    public function send()
    {
        $themePath = 'themes/' . $this->ferme->config['template'] . '/mails/';
        $twigLoader = new \Twig_Loader_Filesystem($themePath);
        $twig = new \Twig_Environment($twigLoader);
        $data = $this->getData();
        $content = $twig->render($this->getTemplate(), $data);

        mail(
            $data['to'],
            $data['subject'],
            $content,
//            "From:" . $data['from']
        );
    }
}

{'fraction_non_alphanumeric': 0.15982028241335045, 'fraction_numerical': 0.0, 'mean_word_length': 2.175152749490835, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '7003639', 'n_tokens_mistral': 468, 'n_tokens_neox': 468, 'n_words': 95}