<commit_before><?php

namespace Vistik\Checks;

abstract class Check
{
    private $error;
    private $log = [];

    abstract public function run(): bool;

    public function log(string $message)
    {
        $this->log[] = $message;
    }

    public function getError(): string
    {
        return $this->error;
    }

    public function setError(string $error)
    {
        $this->error = $error;
    }
}<commit_msg>made sure that error text is added to log<commit_after><?php

namespace Vistik\Checks;

abstract class Check
{
    private $error;
    private $log = [];

    abstract public function run(): bool;

    public function log(string $message)
    {
        $this->log[] = $message;
    }

    public function getError(): string
    {
        return $this->error;
    }

    public function setError(string $error)
    {
        $this->log('[ERROR]:' . $error);
        $this->error = $error;
    }

    public function getLog()
    {
        return $this->log;
    }
}
{'fraction_non_alphanumeric': 0.12828282828282828, 'fraction_numerical': 0.0, 'mean_word_length': 2.2706270627062706, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6498737', 'n_tokens_mistral': 306, 'n_tokens_neox': 297, 'n_words': 81}