public function setText(string $text) : void
    {
        $this->text = implode("\n", array_map(function (string $line) {
            return rtrim($line, ' ');
        }, explode("\n", $text)));

        $this->calculateArtLength();
    }