<commit_before><?php

namespace OfxParser;

/**
 * @author <NAME> <<EMAIL>>
 */
class Fix
{
    private $file;

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

    public function replaceStartDate($search, $replace = '20000101100000')
    {
        $fileContent = $this->getFileContent($this->file);

        $fileContent = str_replace(
            '<DTSTART>' . $search,
            '<DTSTART>' . $replace,
            $fileContent
        );

        $this->saveFileContent($this->file, $fileContent);

        return $this;
    }

    protected function getFileContent($file)
    {
        return file_get_contents($file);
    }

    protected function saveFileContent($file, $content)
    {
        file_put_contents($file, $content);
    }
}
<commit_msg>Remove special chars from file and save<commit_after><?php

namespace OfxParser;

/**
 * @author <NAME> <<EMAIL>>
 */
class Fix
{
    private $file;

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

    public function replaceStartDate($search, $replace = '20000101100000')
    {
        $fileContent = $this->getFileContent($this->file);

        $fileContent = str_replace(
            '<DTSTART>' . $search,
            '<DTSTART>' . $replace,
            $fileContent
        );

        $this->saveFileContent($this->file, $fileContent);

        return $this;
    }

    protected function getFileContent($file)
    {
        return file_get_contents($file);
    }

    protected function saveFileContent($file, $content)
    {
        file_put_contents($file, $content);
    }

    public function removeSpecialChars()
    {
        $fileContent = $this->getFileContent($this->file);

        $fileContent = str_replace('&', 'e', $fileContent);

        $this->saveFileContent($this->file, $fileContent);

        return $this;
    }
}

{'fraction_non_alphanumeric': 0.1397964649169791, 'fraction_numerical': 0.014997321906802356, 'mean_word_length': 2.408759124087591, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 27, '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': '5177868', 'n_tokens_mistral': 586, 'n_tokens_neox': 551, 'n_words': 107}